Limiting macro to a single spreadsheet [Closed]

Report
-
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
-
Hello,
I have a simple macro which saves a spreadsheet to a memory stick for backup purposes via 'ctrl shift S'. If a second spreadsheet is opened the same ctrl shift S will save this spreadsheet to the stick and overwrite the previously saved file causing general confusion. I would like to able to link the macro to a specific spreadsheet and be sure that it only runs when activated from that spreadsheet. I hope this is possible ?

1 reply

Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
hi
just use
if activesheet.name<>"something" then exit sub
after any declarations