Hidden Worksheet

G

gti_jobert

Hi all,

I have a sheet that contains all the data for the app, is it possibl
to have this sheet hidden but still be able to select the data from i
using vb code?

When i do hide the sheet and use the select code;


Code
-------------------

Sheets("RelationalData").Select

-------------------


It produces an error - "Select Method of Worksheet Class Failed"

Any suggestions
 
C

Chip Pearson

You can only Select a range on the Active Sheet, and since your
worksheet is hidden, it will never be the Active Sheet. That
said, it is (almost) never necessary to Select anything in VBA.
Perhaps if you fully describe what you want to accomplish,
someone will post a solution that doesn't need a Select.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"gti_jobert"
in message
news:[email protected]...
 
A

Arvi Laanemets

Hi

Both code snippets below work with sheet RelationalData hidden or even very
hidden:

....
ReadValue=ThisWorkbook.Sheets("RelationalData").Range("A1").Value
....
ActiveSheet.Range("A1").Value=ThisWorkbook.Sheets("RelationalData").Range("A1").Value
 

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

Top