how do use write code so that a checkbox is selected when the program begins?
how do use write code so that a checkbox is selected when the program begins?
Assuming that it is a Forms checkbox
Private Sub Workbook_Open()
Worksheets("Sheet1").CheckBoxes("Check Box 2").Value = 1
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"april27" <[email protected]> wrote in message
news:[email protected]...
> how do use write code so that a checkbox is selected when the program
begins?
Hi Apil27,
Assuming that the checkbox is on a userform, as might be implied by some of
your earlier posts, try:
'=============>>
Private Sub UserForm_Initialize()
Me.CheckBox1.SetFocus
End Sub
'<<=============
---
Regards,
Norman
"april27" <[email protected]> wrote in message
news:[email protected]...
> how do use write code so that a checkbox is selected when the program
> begins?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks