PDA

View Full Version : Solved: Simple question for CheckBox in sheet



Ann_BBO
10-27-2009, 03:59 AM
Hi All,

I have the 1 CheckBox and Name is called "Main" in sheet1 of "A" workbook. In B workbook, I would like to get the status of the "Main" status whether is true. Then, i write the code here
Sub Macro1()
If Workbooks("A.xls").Sheets(1).Main.Value = True Then
MsgBox "Main is True"
End If
End Sub

However, i get the error.

Thanks,
Ann

Bob Phillips
10-27-2009, 04:16 AM
Sub Macro1()
If Workbooks("A.xls").Sheets(1).CheckBoxes("Main").Value = 1 Then

MsgBox "Main is True"
End If
End Sub