LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Set Sheets as variable

I am trying to set two sheets as variables and it is not working how I
thought it should.

I have declared them like this

Dim Sht As Worksheet
Dim Env As Worksheets
And tried to set them like this.
Set Sht = Sheet1
Set Env = Sheet2
It errors out on the Set Env line. I am not sure how to make this
right. I would prefer sot to have to use Sheet2 for evey place in my
code that I have Env.

Thanks,
Jay
 
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
SUM command using variable sheets IanC Excel Worksheet Functions 3 May 18th 07 11:56 PM
add new sheets in a workbook with new sheets being a variable [email protected] Excel Discussion (Misc queries) 1 April 11th 06 08:38 PM
How to have a variable cell reference across sheets? Shane Gibson Excel Discussion (Misc queries) 3 March 8th 06 10:10 PM
Need Help: 'sheets' function with a variable in a formula livin Excel Worksheet Functions 2 September 7th 05 10:27 PM
Use of variable to identify range of sheets in a workbook rhs414 Excel Discussion (Misc queries) 1 June 20th 05 01:42 PM


All times are GMT +1. The time now is 02:09 PM.

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"