ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Running a macro with hidden sheets (https://www.excelbanter.com/excel-programming/388454-running-macro-hidden-sheets.html)

JonathanW

Running a macro with hidden sheets
 
Hi,
I've just finished setting up my spreadsheet and starting hiding sheets that
users don't need to see, and I have a macro that no longer works since hiding
the sheet.
The code is:
Sheets("BINDING").Select
Is there any way I can still use this macro but hide the sheet?

Filo

Running a macro with hidden sheets
 
Try to change Select with Activate:

Sheets("BINDING").activate


"JonathanW" wrote:

Hi,
I've just finished setting up my spreadsheet and starting hiding sheets that
users don't need to see, and I have a macro that no longer works since hiding
the sheet.
The code is:
Sheets("BINDING").Select
Is there any way I can still use this macro but hide the sheet?


Halim

Running a macro with hidden sheets
 
Hi Jon,

You cannot select or activate the hidden object, but you can change the
sheets contents by code.
Just like:
Sheets("BINDING").Range("A1").Value = "TestValue"

Altough Sheets("BINDING") is hidden.

--

Regards,

Halim


"JonathanW" wrote:

Hi,
I've just finished setting up my spreadsheet and starting hiding sheets that
users don't need to see, and I have a macro that no longer works since hiding
the sheet.
The code is:
Sheets("BINDING").Select
Is there any way I can still use this macro but hide the sheet?



All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com