View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default macro not working once filename changes

If you want to activate the workbook with the code

Thisworkbook.Activate

--
Regards,
Tom Ogilvy


"XCESIV" wrote in
message ...

The data is being picked up from a different workbook. to do this it
needs to open the 2nd workbook. In the master file it i have it
working, but not once i change the file name

Here is the line that is the problem

Windows("AFNE MASTER.xls").Activate

Once the file name is changed from this the macro can no longer go back
to this file. I need this line to recognise the change in file name


--
XCESIV
------------------------------------------------------------------------
XCESIV's Profile:

http://www.excelforum.com/member.php...o&userid=24271
View this thread: http://www.excelforum.com/showthread...hreadid=538258