run macro only in certain file/worksheet
Activesheet.name returns the sheet name, activeworkbook.name the file
"huepf" wrote:
Hi,
I want to make sure that a macro only runs in one certain file.
I was thinking to get check the file name of the open file and run the
program only if it's the right file. Is there an easier way to do
that?
If not, how do I get the file name of the open and active worksheet?
thanks!
|