ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro needs data from hidden worksheet (https://www.excelbanter.com/excel-programming/372391-macro-needs-data-hidden-worksheet.html)

[email protected]

Macro needs data from hidden worksheet
 
Hello,

I am developing an Excel-Sheet in order to compare easily vehicle
dimensions.

I have written a few macros that need to access data from a worksheet
called "Cache".
To avoid any future damage caused by "inexperienced" users, I want
to hide this worksheet "Cache" (Format - Worksheet - Hide). But
in this case the macro cannot work!!!

The macro needs to "see" the worksheet!

Is there any way I can hide the worksheet "Cache" and run the macro
at the same time.

Again, I would really appreciate any help. Thanks a lot!

Guillaume


Udo

Macro needs data from hidden worksheet
 
Hi Guillaume,

let's assume that your sheet is called VeryImportant. Your problem can
be solved by a small VBA program, which you put into ThisWorkbook:
sub workbook_open()
ThisWorkbook.Sheets("VeryImportant").Visible = xlVeryHidden
end sub
With that, the user can use the file and all the sheets of it, with the
exception of that very sheet. There is no way for a normal user to get
access to VeryImportant. That is only possible via programming, where
you write
ThisWorkbook.Sheets("VeryImportant").Visible =True

Hope that cures your problem.
Udo

schrieb:

Hello,

I am developing an Excel-Sheet in order to compare easily vehicle
dimensions.

I have written a few macros that need to access data from a worksheet
called "Cache".
To avoid any future damage caused by "inexperienced" users, I want
to hide this worksheet "Cache" (Format - Worksheet - Hide). But
in this case the macro cannot work!!!

The macro needs to "see" the worksheet!

Is there any way I can hide the worksheet "Cache" and run the macro
at the same time.

Again, I would really appreciate any help. Thanks a lot!

Guillaume



Nigel

Macro needs data from hidden worksheet
 
You can if there you do not select or activate statements pointing at the
Cache sheet. Suggest you post the code to see where it is going wrong.

--
Cheers
Nigel



wrote in message
oups.com...
Hello,

I am developing an Excel-Sheet in order to compare easily vehicle
dimensions.

I have written a few macros that need to access data from a worksheet
called "Cache".
To avoid any future damage caused by "inexperienced" users, I want
to hide this worksheet "Cache" (Format - Worksheet - Hide). But
in this case the macro cannot work!!!

The macro needs to "see" the worksheet!

Is there any way I can hide the worksheet "Cache" and run the macro
at the same time.

Again, I would really appreciate any help. Thanks a lot!

Guillaume




[email protected]

Macro needs data from hidden worksheet
 
Thank you all!
You told me exactly what I needed!

Regards,

Guillaume

JLGWhiz schrieb:

If you use Udo's suggestion, don't forget to hide your sheet again when it
has served it's purpose with:

ThisWorkbook.Sheets("VeryImportant").Visible = False

"Udo" wrote:

Hi Guillaume,

let's assume that your sheet is called VeryImportant. Your problem can
be solved by a small VBA program, which you put into ThisWorkbook:
sub workbook_open()
ThisWorkbook.Sheets("VeryImportant").Visible = xlVeryHidden
end sub
With that, the user can use the file and all the sheets of it, with the
exception of that very sheet. There is no way for a normal user to get
access to VeryImportant. That is only possible via programming, where
you write
ThisWorkbook.Sheets("VeryImportant").Visible =True

Hope that cures your problem.
Udo

schrieb:

Hello,

I am developing an Excel-Sheet in order to compare easily vehicle
dimensions.

I have written a few macros that need to access data from a worksheet
called "Cache".
To avoid any future damage caused by "inexperienced" users, I want
to hide this worksheet "Cache" (Format - Worksheet - Hide). But
in this case the macro cannot work!!!

The macro needs to "see" the worksheet!

Is there any way I can hide the worksheet "Cache" and run the macro
at the same time.

Again, I would really appreciate any help. Thanks a lot!

Guillaume






All times are GMT +1. The time now is 05:01 AM.

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