Excel VBA - Selecting hidden worksheets

  • Thread starter Thread starter howie
  • Start date Start date
H

howie

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
 
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
 
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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top