ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveSheet (https://www.excelbanter.com/excel-programming/273271-activesheet.html)

Graham[_3_]

ActiveSheet
 
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


All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com