#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gti_jobert
 
Posts: n/a
Default Hidden Worksheet


Hi all,

I have a sheet that contains all the data for the app, is it possible
to have this sheet hidden but still be able to select the data from it
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?


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=511699

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chip Pearson
 
Posts: n/a
Default Hidden Worksheet

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"
wrote
in message
...

Hi all,

I have a sheet that contains all the data for the app, is it
possible
to have this sheet hidden but still be able to select the data
from it
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?


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile:
http://www.excelforum.com/member.php...o&userid=30634
View this thread:
http://www.excelforum.com/showthread...hreadid=511699



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvi Laanemets
 
Posts: n/a
Default Hidden Worksheet

Hi

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

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


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"gti_jobert" wrote
in message ...

Hi all,

I have a sheet that contains all the data for the app, is it possible
to have this sheet hidden but still be able to select the data from it
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?


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile:
http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=511699



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code to Add data to exsiting worksheet jonesaa05 Excel Discussion (Misc queries) 7 October 14th 05 01:20 PM
advanced: synchronizing data value across two worksheet drop boxes mdhokie Excel Worksheet Functions 1 October 6th 05 08:46 PM
Accessign formula's in worksheet that appear to have been hidden Tim Ashcom Excel Discussion (Misc queries) 9 July 22nd 05 04:53 PM
Copy without Hidden Cols - How abrogard Excel Discussion (Misc queries) 1 July 15th 05 07:54 AM
copyright and worksheet protection dow Excel Discussion (Misc queries) 2 January 3rd 05 03:07 PM


All times are GMT +1. The time now is 06:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"