Hiding Check Boxes In VB excel 2007

starrysky

New Member
Joined
Dec 9, 2008
Messages
3
Hello!!

Im Having trouble with my Visual basic code in Excel 2007.
I'm using the code to hide two rows which works fine, however my code to hide the check box (second line of code) doesn't work so if anyone can see where I'm going wrong that would be great
smile.gif


Code:
Sub CheckBox17_Click()

Rows("34:35").Hidden = Not (Rows("34:35").Hidden)
ActiveSheet.CheckBoxes("CheckBox19").Visible = Not (ActiveSheet.CheckBoxes("CheckBox19").Hidden)


End Sub

 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I'm self-taught; so, take that disclaimer.

But I would've just used the code:

CheckBox19.Visible = False

unless there was a reason I couldn't.

How about that simpler line of code? It worked for me in a quick test
 
Upvote 0
Thankies! Simpler code is fine as long as it does the job however i still cant get it working it just says debug although its probably just me missing something out.
 
Upvote 0

Forum statistics

Threads
1,214,528
Messages
6,120,065
Members
448,942
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top