Snowlock64
New Member
- Joined
- Jan 28, 2019
- Messages
- 1
Whenever I record a macro the vba always adds an additional section on where to locate the file. As you can see below actual location for the file is located on the H: Drive but it adds an openfilename= in C Drive. A colleague on the same network as me created an identical macro which works fine.
I always get a runtime error message. I can delete the fewadditional lines but it’s a pain having to do that each time I create a macro.I am assuming its something to do with the personal xlsb but I am not sure. Anyhelp would be appreciated.
I always get a runtime error message. I can delete the fewadditional lines but it’s a pain having to do that each time I create a macro.I am assuming its something to do with the personal xlsb but I am not sure. Anyhelp would be appreciated.
Code:
Workbooks.Open Filename:= _
"C:\Users\Username\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.MSO\Copy of completed matters by case manager.xls"
ActiveWindow.Visible = False
Workbooks.Open Filename:= _
"H:\PO KE\Reports For Rolling PIH\completed matters by case manager.xls"
Range("A5:C18").Select