ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,226
- Office Version
- 2007
- Platform
- Windows
Morning,
Please can you advise how i can do the following.
I have a worksheet where when i double click the customers name in column A that then selected customer is shown in my database
Here is the code.
Now on a userform i search for customers.
The results are then shown in ListBox1.
I select the customer in ListBox1 then press a commandbutton.
The userform closes & that customer is then selected on my worksheet.
Here is the code
I wish to add/edit the code in RED above so that customer is then open in my database as opposed to just being selected on my worksheet as it currently does.
OR
Just open that customer in the database directly from my userform without the need to select them on the worksheet first
Thanks
Please can you advise how i can do the following.
I have a worksheet where when i double click the customers name in column A that then selected customer is shown in my database
Here is the code.
Rich (BB code):
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Range("A6", Cells(Rows.Count, "A").End(xlUp)), Target) Is Nothing Then Exit Sub
Cancel = True
Database.LoadData Me, Target.Row
End Sub
Now on a userform i search for customers.
The results are then shown in ListBox1.
I select the customer in ListBox1 then press a commandbutton.
The userform closes & that customer is then selected on my worksheet.
Here is the code
Rich (BB code):
Private Sub GoToCustomerVehicle_Click()
Dim answer As Integer
With ListBoxSearch
Range("A" & ListBoxSearch.List(ListBoxSearch.ListIndex, 2)).Select
Unload FindAndReplaceDatabase
End With
End Sub
I wish to add/edit the code in RED above so that customer is then open in my database as opposed to just being selected on my worksheet as it currently does.
OR
Just open that customer in the database directly from my userform without the need to select them on the worksheet first
Thanks