Alan Treanor
Alan Treanor

Reputation: 159

Unable to amend the Visible Property

I am using the following code at the start of a script to unhide a very hidden sheet within Excel.

But I am getting an error saying I am unable to amend the visible property. (Screen shot of error message)

I am basically trying to unhide the sheet & then once the sheet has been update it make it very hidden again.

Any help?

Thanks Al

enter image description here

Sheets("UserActive").Visible = xlVisible

Upvotes: 0

Views: 544

Answers (2)

user4039065
user4039065

Reputation:

Try:

Sheets("UserActive").Visible = true

Upvotes: 0

Jur Pertin
Jur Pertin

Reputation: 564

Either of the below statement should work. Please check the spelling of worksheet name. Worksheets("UserActive").Visible = -1

or

Worksheets("UserActive").Visible = xlSheetVisible

Upvotes: 1

Related Questions