View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Select a sheet by name in a macro

I'd use:

sheets(sheets("sheet1").range("Y4").value).whateve ryou'redoinghere


swatsp0p wrote:

Aidan: Thanks for your response.

Tom: you are correct, Sheets("JAN 06") works fine, however,
Sheets(Sheet1!Y4.value) doesn't.

How can I get the value from Y4 ("Jan 06") on sheet1 into the code so
it will read from Jan 06? I don't want the user having to edit the
macro each time they want to print from a different data set from
another sheet.

Is it because "Jan 06" is a TEXT entry, not a numeric entry?

Thanks for your guidance on this.

--
swatsp0p

------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=549966


--

Dave Peterson