View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 380
Default using variables to reference sheets

Ok so how do you know which you will be accessing?

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"marksince1984"
wrote in message
news:marksince1984.29baqn_1150153805.9392@excelfor um-nospam.com...

Can you clarify this a bit more for me??

Everytime the macro is run the variable may be different.

Ie there could be five sheets with names mon, tues, wed. Tomorrow they
could be tues, wed, thurs. I need to be able to call these sheets (by
using the variable)

Sorry but i am still new to this





Bob Phillips Wrote:
Don't set it to the worksheet name, set it to the worksheet object

Set sh = Worksheets("Sheet1")

...

TableDestination = sh.Range("A10").Value

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)




--
marksince1984
------------------------------------------------------------------------
marksince1984's Profile:

http://www.excelforum.com/member.php...o&userid=33484
View this thread: http://www.excelforum.com/showthread...hreadid=551223