AndrewGKenneth
Board Regular
- Joined
- Aug 6, 2018
- Messages
- 59
Hi there,
Would anyone be able to help? I am trying to create a code for my Userform to autofill certain textboxes based on the value of the initial textbox. The initial textbox that the code would be based on is Textbox_JobNumber.
To explain in more detail there will be multiple duplicate entries in the Textbox_JobNumber section of the userform, so that one job number has multiple duplicate entries. But there will also be multiple duplicate values in a range of other textboxes with the names Textbox_LotNumber, Textbox_ProductNumber, TextBox_PartName, Textbox_DrawingNumber, TextBox_Customer and Textbox_Order. Each textbox has a different value from each other (i.e. Text_productnumber is different to TextBox_DrawingNumber) but will always be the same within themselves as long as the job number is the same. (i.e. TextBox_Product Number will always be say 1234 for that specific job number)
For example, TextBox_JobNumber has value J1815211
TextBox_PartName is HF.11X33J
These values will remain the same for each textbox until the job number is changed. Therefore, I need code to recognise in the userform that all entries for Job Number J1815211, will be the same in each textbox until the job number changes. I.E. textbox_order, textbox_customer will be the same value until a new job number is entered. So this would mean the userform only has to be filled in manually for the first entry of each job number and then it will recognise and duplicate the data with autofill.
Please let me know if this is possible or if you need anymore information, as I am new to VBA.
Thanks so much,
Andrew
Would anyone be able to help? I am trying to create a code for my Userform to autofill certain textboxes based on the value of the initial textbox. The initial textbox that the code would be based on is Textbox_JobNumber.
To explain in more detail there will be multiple duplicate entries in the Textbox_JobNumber section of the userform, so that one job number has multiple duplicate entries. But there will also be multiple duplicate values in a range of other textboxes with the names Textbox_LotNumber, Textbox_ProductNumber, TextBox_PartName, Textbox_DrawingNumber, TextBox_Customer and Textbox_Order. Each textbox has a different value from each other (i.e. Text_productnumber is different to TextBox_DrawingNumber) but will always be the same within themselves as long as the job number is the same. (i.e. TextBox_Product Number will always be say 1234 for that specific job number)
For example, TextBox_JobNumber has value J1815211
TextBox_PartName is HF.11X33J
These values will remain the same for each textbox until the job number is changed. Therefore, I need code to recognise in the userform that all entries for Job Number J1815211, will be the same in each textbox until the job number changes. I.E. textbox_order, textbox_customer will be the same value until a new job number is entered. So this would mean the userform only has to be filled in manually for the first entry of each job number and then it will recognise and duplicate the data with autofill.
Please let me know if this is possible or if you need anymore information, as I am new to VBA.
Thanks so much,
Andrew