Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to pass a user defined name (Oracle_no) to a command
button. In the following code, I am doing a VBLOOKUP on oracle_no, but when I debug the code, I find that oracle_no is not being passed. Should I do this in a function instead? I guess I can't utilize defined field names in a command button? Private Sub Check_For_Existing_Oracle_No_Click() Dim rng As Range Dim Test As Variant Sheets("Upload Data").Select Set rng = GetRealLastCell(ActiveSheet) lookuprange = ("$C$2:" + rng.Address) MsgBox "oracle no follows" MsgBox oracle_no Test = Application.VLookup(oracle_no, Range(lookuprange), 1, False) MsgBox IsError(Test) MsgBox lookuprange If IsError(Test) Then MsgBox "It wasn't found" Else MsgBox "it was found" End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pass a cell in sheet to macro or command button | Excel Programming | |||
VB's Command Button vs Form's Command Button | Excel Programming | |||
How to: Pass Command Line Parameter ??? | Excel Worksheet Functions | |||
Can't pass publically defined variable to a function | Excel Programming | |||
Command and pass value to Acces from Excel | Excel Programming |