Hi
I am trying to build a fairly simple macro in VBA for Excel. I have run into a problem with trying to define a variable that equals ActiveWorkbook.Name. What I want to do is store the name of the workbook I am starting from, then open a few others and re-activate the original one to work on it. If I set a variable to Activeworkbook.Name the value changes every time I open a new workbook, so I lose the name of the oiginal book that I want to return to. I guess Ii could set the variable to Workbooks(1).Name but that won't work if I happen to have more than one book open when I run the macro. I'm sure this will be an easy one for someone to answer - any suggestions?
Thanks
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).