How to pass arguments from ThisWorkbook to a UserForm

  • Thread starter Thread starter strataguru
  • Start date Start date
S

strataguru

I have a userform that has a number of checkboxes in it.

When the user double click on a specific cell - I have an event that
calls the userform - the userform gives the user the option of what
checkboxes they'd like to select.

With those selected checkboxes, I'd like to put values in the cell the
user double clicked.

I just don't know how to get the target information into the userform -
or vice versa - the information from the userform back into
ThisWorkbook.

Thanks,
Robin
 
Robin,

To load a userform control, from within a normal code module, you would use
something like

Userform1.Textbox1.text = Range("A1").Value

Vice Versa, from within the Userform class module

If Checkbox1.Value = Trfue Then
Worksheets("Sheet1").Range("A1").Value = 17
If Checkbox2.Value = Trfue Then
Worksheets("Sheet1").Range("B1").Value = 27
If Checkbox3.Value = Trfue Then
Worksheets("Sheet1").Range("C1").Value = 37
End If


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top