View Single Post
  #40   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Help with Mr. Peterson's Code.. Print serially from a Sheet

Since the range named ID is on each of the sheets that needs to be printed
(that's the one cell that gets changed for each value in the data|validation
list), it should be a sheet level name.

In this line:
wks.Range("ID").Value = myCell.Value

wks is the activesheet. So excel should be able to find that ID range (if you
created it for that sheet).




prkhan56 wrote:

Hi Dave,

What I meant is that if I have a global range name 'ID' then the code
runs only for a single sheet PC Details Sheet in this case... but when
I remove the global range name ID then even PC Details gives me run
time.

I think it has something to do with the Global and Worksheet Level
Name...I removed the global range name 'ID' and tested it on other
sheets then it works only for that particular sheet....

In other words... the code you suggested will not work unless there is
a Global Range name 'ID' defined...and will work only for the Sheet to
which the Global Range Name 'ID' is referred...Unfortunately I cannot
have more than one Global Range Name 'ID' for other sheets
Do you get what I am trying to say?

Thanks

Rashid Khan


--

Dave Peterson