Updating Check Boxes in User Form does not change worksheet
Having responded to your post with an answer to someone else's thought
better have a look at yours!
If I follow you have checkboxes on a userform, from your Update_Installer
event you want to change corresponding Forms style checkboxes on a worksheet
to equivalent values, right?
Add a Forms style checkbox named "Check Box 1" to Sheet1 and a checkbox
control on a userform named "Checkbox1", with the following code
Change the checkbox on the userform then click anywhere on the form to apply
the change to the worksheet checkbox
Private Sub UserForm_Click()
Dim ws As Worksheet
Set ws = ActiveWorkbook.Worksheets("Sheet1")
ws.CheckBoxes("Check Box 1").Value = _
CLng(Me.Controls("Checkbox1").Value) * -1
' the value checkboxes from the Forms menu is
' xlOn or xlOff, namely 1 or 0
' the *1 is not strictly necessary
End Sub
Regards,
Peter T
"Brian" wrote in message
...
I have a user Form with several Check Boxes on it. When I check or uncheck
the Boxes it does not change the boxes in the workbook/worksheet. The User
Form is a different workbook then the Worksheet I want to update.
When you click on the Check box on the worksheet it shows "Check Box ##".
This is the same Workbook/Sheet reference I am using for several other
things
and they all update correctly. What did I do wrong?
Here is the code I was trying to use:
Private Sub Update_Installer_Forms_8_Click()
With Workbooks("Master Installer Forms.xlsm").Sheets("Install Pack")
.Range("Check Box 59").Value =
Me("Office_Package_Preparations_101").Value
.Range("Check Box 60").Value =
Me("Office_Package_Preparations_102").Value
.Range("Check Box 61").Value =
Me("Office_Package_Preparations_103").Value
.Range("Check Box 62").Value =
Me("Office_Package_Preparations_104").Value
End With
End Sub
|