ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,226
- Office Version
- 2007
- Platform
- Windows
Afternoon.
I have this code in use which works fine.
I would double click a customer in column A & the userform will open & there record is then shown.
What i would like to do is when a userform opens when opening this worksheet i can click the command button to open the customer ONLY in cell A6
So this new code will only work for customer present at the time in cell A6
I select the worksheet.
A userform opens.
I click on the command button.
The code runs, & the customers name in cell A6 has his record now loaded / shown on the opening userform.
I have this code in use which works fine.
I would double click a customer in column A & the userform will open & there record is then shown.
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
What i would like to do is when a userform opens when opening this worksheet i can click the command button to open the customer ONLY in cell A6
So this new code will only work for customer present at the time in cell A6
I select the worksheet.
A userform opens.
I click on the command button.
The code runs, & the customers name in cell A6 has his record now loaded / shown on the opening userform.