Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default read from hidden sheet

I am trying to read data from a hidden sheet in vba.
If i have a sheet "test1" that is visible. and "test2" which is hidden.
in my code i say
sheets("test2").Activate

in the watches window
Excel.ActiveSheet.Name = test2

on the next statment I execute the sheet switches back to test1
Excel.ActiveSheet.Name = test1

is there some trick?
do i have to make the sheet visible?

thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default read from hidden sheet

Hi

You don't have to active a sheet to read values from the sheet.

Dim Sh2 as Worksheet
Set Sh2=Worksheets("test2")

MyVal=sh2.Range("A1").value

Hopes this helps.

---
Per

On 6 Maj, 22:48, "greg" wrote:
I am trying to read data from a hidden sheet in vba.
If i have a sheet "test1" that is visible. *and "test2" which is hidden..
in my code i say
sheets("test2").Activate

in the watches window
Excel.ActiveSheet.Name = test2

on the next statment I execute the sheet switches back to test1
Excel.ActiveSheet.Name = test1

is there some trick?
do i have to make the sheet visible?

thanks


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
enable re-code to re-read on re-hidden columns, if can be possible driller Excel Discussion (Misc queries) 6 October 11th 09 12:52 PM
Read only access for hidden sheet Kashyap Excel Programming 2 April 13th 09 07:33 PM
create a formula in one sheet that would read data from separate sheet automatically QD Excel Discussion (Misc queries) 0 December 8th 06 04:17 AM
I need my Hidden Rows to stay hidden when I print the sheet. Rosaliewoo Excel Discussion (Misc queries) 2 July 20th 06 07:51 PM
Saving hidden data with a worksheet (preferably without using a hidden sheet) Dick Kusleika[_3_] Excel Programming 2 January 21st 04 04:39 PM


All times are GMT +1. The time now is 09:17 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"