Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
After a User has entered data in a spreadsheet, I want to verify that the
data is valid. I assign a variable to the data I want to validate, go to the table where the valid data resides and try to do a search but I get a message "Object Variable or with Block Variable Not Set". Here is basically the code I am using: Sub Macro2() Dim acct As Object Dim searchfound As String Cells(1, 1).Select acct = "x" Cells.Find(What:=acct, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate searchfound = ActiveCell.Value If searchfound = acct Then MsgBox ("Found it") Else MsgBox ("Did not find it") End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MsgBox to validate an entry | Excel Programming | |||
Validate InputBox entry | Excel Programming | |||
Validate textbox entry | Excel Programming | |||
Validate Combobox entry | Excel Programming | |||
Validate Textbox entry | Excel Programming |