Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Giday Everyone
I'm trying to use Vlookup in a Worksheet_SelectionChange event. It works fine but only if the lookup table is on the same worksheet. The same code in a module works with the table on any worksheet. Private Sub Worksheet_SelectionChange(ByVal Target As Range) myanswer = Application.VLookup(Range("a1"), Range("table"), 2, False) MsgBox (myanswer) End Sub Sub test() myanswer = Application.VLookup(Range("a1"), Range("table"), 2, False) MsgBox (myanswer) End Sub Have I found a limitation or is there an easy way around this? Thanks in advance. Regards Brad Brisbane Australia |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet_SelectionChange | Excel Programming | |||
Worksheet_SelectionChange | Excel Programming | |||
Worksheet_SelectionChange | Excel Programming | |||
Worksheet_SelectionChange | Excel Programming | |||
worksheet_SelectionChange Event | Excel Programming |