ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide a worksheet (https://www.excelbanter.com/excel-programming/395594-hide-worksheet.html)

Dale Fye

Hide a worksheet
 
I'd like to be able to hide a worksheet that I am using for data storage, how
can I do this programmatically? Using the Excel menus?

--
Email address is not valid.
Please reply to newsgroup only.

Dale Fye

Hide a worksheet
 
figured it out activeworkbook.sheets(1).visible = false

Unfortunately, it appears that now that I have hidden that worksheet, I can
no longer refer to the cells on it? Any way to work around this?

Dale
--
Email address is not valid.
Please reply to newsgroup only.


"Dale Fye" wrote:

I'd like to be able to hide a worksheet that I am using for data storage, how
can I do this programmatically? Using the Excel menus?

--
Email address is not valid.
Please reply to newsgroup only.


Dave Peterson

Hide a worksheet
 
You can still refer to the cells on that hidden sheet. But you won't be able to
select the sheet or select cells on that sheet.


with worksheets("Sheet999")
'hide the sheet
.visible = xlsheethidden
'do some stuff
.range("a1").value = "hi"
.range("z1").value = "There"
.cells(23,"x").clearcontents
'check it out
.visible = xlsheetvisible
end with

Dale Fye wrote:

figured it out activeworkbook.sheets(1).visible = false

Unfortunately, it appears that now that I have hidden that worksheet, I can
no longer refer to the cells on it? Any way to work around this?

Dale
--
Email address is not valid.
Please reply to newsgroup only.

"Dale Fye" wrote:

I'd like to be able to hide a worksheet that I am using for data storage, how
can I do this programmatically? Using the Excel menus?

--
Email address is not valid.
Please reply to newsgroup only.


--

Dave Peterson

Dale Fye

Hide a worksheet
 
Thanks,

I'm finally getting the hang of this.

Dale
--
Email address is not valid.
Please reply to newsgroup only.


"Dave Peterson" wrote:

You can still refer to the cells on that hidden sheet. But you won't be able to
select the sheet or select cells on that sheet.


with worksheets("Sheet999")
'hide the sheet
.visible = xlsheethidden
'do some stuff
.range("a1").value = "hi"
.range("z1").value = "There"
.cells(23,"x").clearcontents
'check it out
.visible = xlsheetvisible
end with

Dale Fye wrote:

figured it out activeworkbook.sheets(1).visible = false

Unfortunately, it appears that now that I have hidden that worksheet, I can
no longer refer to the cells on it? Any way to work around this?

Dale
--
Email address is not valid.
Please reply to newsgroup only.

"Dale Fye" wrote:

I'd like to be able to hide a worksheet that I am using for data storage, how
can I do this programmatically? Using the Excel menus?

--
Email address is not valid.
Please reply to newsgroup only.


--

Dave Peterson



All times are GMT +1. The time now is 10:23 PM.

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