Good morning - I wonder if someone can help me.
I have a workbook with a user form that looks like this
Currently, when the user inputs a "Wind Dollar Serial #", the form will use vlookups to find that serial number, currently found on another tab in the same workbook, and display the "Denomination" and "Department Head"
Similarly, below that, when the user inputs a TM#, the form will do vlookups to find the number, again on a different tab in the same workbook, to grab the TM Name and Department.
The code for these currently look like this:
Private Sub TextBox2_Change()
On Error Resume Next
WindDollarLog.TextBox3.Value = ""
WindDollarLog.TextBox4.Value = ""
WindDollarLog.TextBox3.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox2.Value), Sheet3.Range("A:C"), 2, 0)
WindDollarLog.TextBox4.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox2.Value), Sheet3.Range("A:C"), 3, 0)
Private Sub TextBox5_Change()
On Error Resume Next
WindDollarLog.TextBox6.Value = ""
WindDollarLog.TextBox7.Value = ""
WindDollarLog.TextBox6.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox5.Value), Sheet4.Range("B:E"), 2, 0)
WindDollarLog.TextBox7.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox5.Value), Sheet4.Range("B:E"), 4, 0)
Private Sub TextBox8_Change()
On Error Resume Next
WindDollarLog.TextBox9.Value = ""
WindDollarLog.TextBox10.Value = ""
WindDollarLog.TextBox9.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox8.Value), Sheet4.Range("B:E"), 2, 0)
WindDollarLog.TextBox10.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox8.Value), Sheet4.Range("B:E"), 4, 0)
What I would like to do is to have these sheets continue to do the vlookup, but instead of finding the info in different tabs of this same workbook, I'd like for the lookup to find the information in a completely different workbook on the network.
Is this possible? If so, can someone help me with the changes I'd need to make to the code? I'm a complete novice and was kind of lucky to get the **** form to work in the first place! Haha!
I have a workbook with a user form that looks like this
Currently, when the user inputs a "Wind Dollar Serial #", the form will use vlookups to find that serial number, currently found on another tab in the same workbook, and display the "Denomination" and "Department Head"
Similarly, below that, when the user inputs a TM#, the form will do vlookups to find the number, again on a different tab in the same workbook, to grab the TM Name and Department.
The code for these currently look like this:
Private Sub TextBox2_Change()
On Error Resume Next
WindDollarLog.TextBox3.Value = ""
WindDollarLog.TextBox4.Value = ""
WindDollarLog.TextBox3.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox2.Value), Sheet3.Range("A:C"), 2, 0)
WindDollarLog.TextBox4.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox2.Value), Sheet3.Range("A:C"), 3, 0)
Private Sub TextBox5_Change()
On Error Resume Next
WindDollarLog.TextBox6.Value = ""
WindDollarLog.TextBox7.Value = ""
WindDollarLog.TextBox6.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox5.Value), Sheet4.Range("B:E"), 2, 0)
WindDollarLog.TextBox7.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox5.Value), Sheet4.Range("B:E"), 4, 0)
Private Sub TextBox8_Change()
On Error Resume Next
WindDollarLog.TextBox9.Value = ""
WindDollarLog.TextBox10.Value = ""
WindDollarLog.TextBox9.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox8.Value), Sheet4.Range("B:E"), 2, 0)
WindDollarLog.TextBox10.Value = Application.WorksheetFunction.VLookup(CDbl(WindDollarLog.TextBox8.Value), Sheet4.Range("B:E"), 4, 0)
What I would like to do is to have these sheets continue to do the vlookup, but instead of finding the info in different tabs of this same workbook, I'd like for the lookup to find the information in a completely different workbook on the network.
Is this possible? If so, can someone help me with the changes I'd need to make to the code? I'm a complete novice and was kind of lucky to get the **** form to work in the first place! Haha!