Thread: ActiveSheet
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default ActiveSheet

Try

If ActiveSheet.Name = "SC.rpt" Then


(SC.rpt being my last cost centre).However I can't get the
syntax correct and am not sure if this is even the correct
way to go about it.


difficult to tell without seeing your macro??


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Graham" wrote in message ...
Hi,

I have set up a macro to perform a routine on all our
company cost centres which are set in a list. It basically
opens each cost centre report, extracts required data to a
master file and closes the cost centre file.
I wish to perform a different routine when the macro
reaches the last cost centre on my list and was trying to
do something along the lines of

If ActiveSheet = SC.rpt Then.

(SC.rpt being my last cost centre).However I can't get the
syntax correct and am not sure if this is even the correct
way to go about it.

Any assistance gratefully received!

Thanks
Graham