ActiveSheet.Visible = xlVeryHidden

pcc

Well-known Member
Joined
Jan 21, 2003
Messages
1,357
I have this code assigned to a commandbutton on a sheet

Code:
ActiveSheet.Visible = xlVeryHidden

When I click the button, the sheet is hidden, but only hidden, not xlveryhidden - ie it can be unhidden using Format>Sheet>Unhide, and it shows up in VB Explorer with Property Visible = 0 - xlSheetHidden

I must be missing a trick but can't think what.
Can anyone enlighten me?

Cheers
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Thanks Andrew, but it still won't for me!
Anyone out there on Excel 2000 who can try it?
 
Upvote 0
I am on Excel 2000. What other code do you have assigned to your CommandButton? Where is the CommandButton from?
 
Upvote 0
Try

ActiveSheet.Visible = xlSheetVeryHidden


OR

ActiveSheet.Visible = 2


Looks like your const may not be recognised and defaults to 0 = hidden sheet and NOt VeryHidden
 
Upvote 0
Sorry, false alarm.
The code works OK but afetr the
Code:
ActiveSheet.Visible = xlVeryHidden

bit there was some othe code runnng which unhid the sheet and rehid it again, but that code only hid the sheet,
not 'veryhid' it!! :oops: :oops: :oops:

Thanks for taking time out and apologies for being a pratt
 
Upvote 0

Forum statistics

Threads
1,215,494
Messages
6,125,137
Members
449,207
Latest member
VictorSiwiide

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