Some time ago I worked on some code that allows an Excel user to print a label containing a name and 3 lines of address from a workbook. The workbook uses a VLOOKUP to retrieve the details from another Excel file and display them in 4 rows of the current workbook by typing in a ID number that becomes the Lookup Value.
Through a second form, the code then allows the user to selectively print a label by giving options to the next available label position on a sheet of labels.
The requirement now is to print a label without the details being recorded in the current workbook.
I have determined that I will need at three forms.
1. A first form for the options to either print from the current workbook using VLOOKUP to fill the four rows and then to print the label from the results of the VLOOKUP or to print a label from an ID that is typed into the form directly. The second option would need to have a textbox to type the ID into because it would not appear in the current workbook as it does at present.
2. A second form that displays the results of the chosen ID as Name and Address (because they can’t be displayed in the current workbook).
3. A third form would be where the user chooses the next label position.
Currently a second form is used to determine the label position but I imagine this would become the third form when the second option is chosen (to print a label without the information appearing in the current workbook).
How can I get the first form to use the ID number to search a separate Excel file and lookup a corresponding name and address, and then display it in a second form for confirmation?
To make more sense of what I am trying to achieve I have posted a diagram with the forms I will need to develop.