Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi.
I have a form that looks for a asset on a s/sheet list. What I need is a statement that checks to see if the asset is on the list and if not, creates a message box. Heres the code currently: Private Sub CommandButton1_Click() Dim myasset As Variant Dim Assettag As Variant Assettag = UserForm1.TextBox1.Value If UserForm1.TextBox1.Value 0 Then 'Serial # Set myasset = ThisWorkbook.Sheets("Full listing").Columns("a").Find(What:=Assettag, LookAt:=xlWhole) UserForm1.TextBox2.Value = myasset.Offset(0, 1).Value 'Product desc Set myasset = ThisWorkbook.Sheets("Full listing").Columns("a").Find(What:=Assettag, LookAt:=xlWhole) UserForm1.TextBox3.Value = myasset.Offset(0, 2).Value 'City Set myasset = ThisWorkbook.Sheets("Full listing").Columns("a").Find(What:=Assettag, LookAt:=xlWhole) UserForm1.TextBox4.Value = myasset.Offset(0, 3).Value Any help gratefully appreciated. Thanks Pierre |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
how do I turn on document "editing time" found on advanced proper. | Excel Discussion (Misc queries) | |||
Why do I receive "Fill not found" message when I open Excel? | Setting up and Configuration of Excel | |||
"No RETURN() or HALT() function found on macro sheet." | Excel Worksheet Functions | |||
embedding "ISERROR" function into an "IF" statement | Excel Worksheet Functions |