Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vlookup function in VBA code
Hi Everyone
At first I had a code like following ' TextBox2 = Application.VLookup(TextBox1.Value, Sheet4.Range("staff"), 2) but that one does not work. Instead I modified like follows Private Sub CommandButton4_Click() TextBox2 = Application.VLookup(Sheet4.Range("g4"), Sheet4.Range("staff"), 2) End Sub Private Sub TextBox1_Change() Sheet4.Range("G4") = TextBox1.Value End Sub in that case it worked well. But why my first code did not work?Any idea? Thanks for the help... Have a good day |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP | Excel Discussion (Misc queries) | |||
VBA Code to Return Text Embeded in the VLOOKUP Function | Excel Programming | |||
how to use a VLOOKUP function in a VBA code? | New Users to Excel | |||
I want to use Vlookup function and AND function in a single formu. | Excel Worksheet Functions | |||
Using the Vlookup Function in VB Code | Excel Programming |