hi Mike,
I have code that will search for details.
You may see attached file.
What i need is when i open the file, the proceed button should not appear.
It will only appear if the search button has results... Then it can proceed to next step.
hi Mike,
I have code that will search for details.
You may see attached file.
What i need is when i open the file, the proceed button should not appear.
It will only appear if the search button has results... Then it can proceed to next step.
Hi geliedee
Add this Code to the UserForm Module
Modify this Code in the UserForm Module![]()
Private Sub UserForm_Activate() Me.CommandButton2.Visible = False End Sub
![]()
Private Sub CommandButton1_Click() Dim ws As Worksheet Dim ID As String Dim ID2 As Range Dim IDRow As Long Set ws = Sheets("data base") ID = TextBox1 Set ID2 = ws.Range("G:G").Find(what:=ID, LookIn:=xlValues, lookat:=xlWhole) If ID2 Is Nothing Then MsgBox "This ID does not appear in the data." Exit Sub Else IDRow = ID2.Row Me.CommandButton2.Visible = True '<---Add this Line of Code End If TextBox2 = ws.Cells(IDRow, 7) TextBox3 = ws.Cells(IDRow, 1) TextBox4 = ws.Cells(IDRow, 3) TextBox5 = ws.Cells(IDRow, 8) TextBox6 = ws.Cells(IDRow, 9) TextBox7 = ws.Cells(IDRow, 11) TextBox8 = ws.Cells(IDRow, 6) TextBox9 = ws.Cells(IDRow, 4) End Sub
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks