View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] u208839@hotmail.com is offline
external usenet poster
 
Posts: 8
Default Run macro from active workbook whose name keeps changing

Hi Gary,

Thanks for the response. I used the codes you suggested but it didnt' work. It was failing at these 2 lines.

Keep in mind that the desination file "MBC Data Backup.xlsb" will never change name nor location. The source file where this macro resides in will change version from 3.0 to 3.1, 3.2, 3.3 etc). I think what I need is to figure how how to reference the active workbook as being dynamic instead of a static name.




Set wkbSource = Workbooks("Iron Horse MBC Listing 0.3.1.xlsb")
Set wkbTarget = Workbooks.Open(Filename:=sFilename)