AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 2,072
- Office Version
- 2019
- 2010
- Platform
- Windows
I'm attempting to Load a UserForm from a Worksheet Double Click
I also want to pass a worksheet Range to the Form so using:
When this is called from the worksheet BeforeDoubleClick
the Userform Initialise event run. But it uses the Range not yet Set.
So a boolean Exits the Initialise event and the Property Let executes to Set MyRow.
But after that a Load (or Show) UserForm skips the initialise event, which is now wanted.
I can think of some hacks to maybe get around this, but what the correct way to do it please?
Thanks for any help.
I also want to pass a worksheet Range to the Form so using:
Code:
Public Property Let Dat (inVal as Range)
Set MyRow= inVal
End Property
When this is called from the worksheet BeforeDoubleClick
Code:
myForm.Dat = Me.Range("A" & Target.Row & ":F" & Target.Row)
the Userform Initialise event run. But it uses the Range not yet Set.
So a boolean Exits the Initialise event and the Property Let executes to Set MyRow.
But after that a Load (or Show) UserForm skips the initialise event, which is now wanted.
I can think of some hacks to maybe get around this, but what the correct way to do it please?
Thanks for any help.