TurboDieselOne
Board Regular
- Joined
- Oct 29, 2008
- Messages
- 52
Hi I have the following code
Code:
Private Sub Userform_Activate() [code]
[code]On Error Resume Next [code]
[code]TextBox1.Value = ActiveCell [code]
[code]Search = Application.WorksheetFunction.VLookup(Left(RightTextBox1, 21), 6), Range("Notessearch"), 16, False) [code]
[code]TextBox1.Value = ActiveCell & Chr(10) & "----------" & Chr(10) & Search [code]
[code]On Error GoTo 0[code]
End Sub
how can i change this to open a workbook then lookup in the range "Notesearch" in this workbook apply the data to the :-
TextBox1.Value = ActiveCell & Chr(10) & "----------" & Chr(10) & [B]Search[/B]
then close the Workbook
ActiveCell is on this workbook but the data for [B]Search[/B] is on the closed workbook
Thanks