TurboDieselOne
Board Regular
- Joined
- Oct 29, 2008
- Messages
- 52
Hi
Have this code when you double click on a cell a little form opens with the contents in a multiline text box. Fine works now i need this text box to look up somthing on the activecells contents using vlookup
example cell contents
ARKWRIGHT ROAD--NW3--60643726--4530856866--213185 03/05/2011
Private Sub Userform_Activate()
TextBox1.Value = ActiveCell & Chr(10) & (Application.WorksheetFunction.VLookup(Left(Right(TextBox1.Value, 21), 6), Notes, 16, False))
End Sub
But would also like to add an if statement that this only applies on the condition the Textbox does not have any CHR10's (1 Line Only)
Thanks
PS this will go a long way in cleaning up a great app
Have this code when you double click on a cell a little form opens with the contents in a multiline text box. Fine works now i need this text box to look up somthing on the activecells contents using vlookup
example cell contents
ARKWRIGHT ROAD--NW3--60643726--4530856866--213185 03/05/2011
Private Sub Userform_Activate()
TextBox1.Value = ActiveCell & Chr(10) & (Application.WorksheetFunction.VLookup(Left(Right(TextBox1.Value, 21), 6), Notes, 16, False))
End Sub
But would also like to add an if statement that this only applies on the condition the Textbox does not have any CHR10's (1 Line Only)
Thanks
PS this will go a long way in cleaning up a great app