vnej4304
asked on
Excel - Range.Hidden property
Hello,
I have got a problem with use of Range.Hidden property:
I put the ActiveX CheckBox on my sheet and assigned following procedure:
Private Sub CheckBox1_Click()
Columns(10).Value = "Abracadabra"
Columns(10).Hidden = True
End Sub
The first line is OK (All fields in the Column No.10 are filled with "Abracadabra") whereas the second one fail (Error 1004).
Note that if I put these two lines for instance in Worksheet_Change event, everything is OK.
Regards,
Vladimir
I have got a problem with use of Range.Hidden property:
I put the ActiveX CheckBox on my sheet and assigned following procedure:
Private Sub CheckBox1_Click()
Columns(10).Value = "Abracadabra"
Columns(10).Hidden = True
End Sub
The first line is OK (All fields in the Column No.10 are filled with "Abracadabra") whereas the second one fail (Error 1004).
Note that if I put these two lines for instance in Worksheet_Change event, everything is OK.
Regards,
Vladimir
You must reset the focus from the ActiveX Checkbox
to the Excel Worksheet object.
This is probably an old excel bug ...
(This error irritates me really long)
WoK
to the Excel Worksheet object.
This is probably an old excel bug ...
(This error irritates me really long)
WoK
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you VERY much for your quick and comprehensive answer.
Have a great day!
Vladimir Nejedly
Have a great day!
Vladimir Nejedly
ASKER
Thank you VERY much for your quick and comprehensive answer.
Have a great day!
Vladimir Nejedly
Have a great day!
Vladimir Nejedly
Best regards;o)
WoK
WoK
Private Sub CheckBox1_Click()
Columns(1).Value = "Abracadabra"
Application.ActiveCell.Sel
Columns(1).Hidden = True
End Sub
You must set the focus to the excel sheet back from
the checkbox ..