ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VBA - Selecting hidden worksheets (https://www.excelbanter.com/excel-programming/297073-excel-vba-selecting-hidden-worksheets.html)

howie

Excel VBA - Selecting hidden worksheets
 
Hi.

I am designing a workbook in Excel 2002, using VBA6, and i have made
worksheet that contains references and sourcematerial I don't want th
user to see. But when I hid the document, I found that th
sheet(xxx).select function no longer worked.

Help

--
Message posted from http://www.ExcelForum.com


Frank Kabel

Excel VBA - Selecting hidden worksheets
 
Hi
in most cases you don't need to select a sheet. Something
like the following works also for hidden sheets:
sub foo()
dim wks as worksheet
set wks = worksheets ("Sheetxxx")
msgbox wks.range("A1").value
end sub

-----Original Message-----
Hi.

I am designing a workbook in Excel 2002, using VBA6, and

i have made a
worksheet that contains references and sourcematerial I

don't want the
user to see. But when I hid the document, I found that

the
sheet(xxx).select function no longer worked.

Help?


---
Message posted from http://www.ExcelForum.com/

.


Don Guillett[_4_]

Excel VBA - Selecting hidden worksheets
 
You can't select a hidden sheet. But you usually don't need to select a
sheet anyway. Show us your code for suggestions.
sheets("sheet1").select
range("a1").select
activecell.copy
sheets("sheet2").select
range("a1").select
activecell.paste

can be this without selections of any kind
sheets("sheet1").range("a1").copy sheets("sheet2").range("a1")

--
Don Guillett
SalesAid Software

"howie " wrote in message
...
Hi.

I am designing a workbook in Excel 2002, using VBA6, and i have made a
worksheet that contains references and sourcematerial I don't want the
user to see. But when I hid the document, I found that the
sheet(xxx).select function no longer worked.

Help?


---
Message posted from
http://www.ExcelForum.com/





All times are GMT +1. The time now is 09:48 AM.

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