I apologize if this has been answered before but I'm new to this and still have lots to learn. Here is what I'm trying to do:
I can run a macro that opens a file as long as that path and file is static:
Workbooks.Open Filename:="C:\m ydoc\myfile\Dat a.xlsx", _
UpdateLinks:=3
suppose I have to move this file to a different path: C:\newdoc\newfi le\data.xlsx. My macro will not work unless I go in and edit the macro to reflect where the file is now located.
I prefer to somehow have some sort of variable say in an inputs worksheet so that whatever that variable contains the macro can read it and thus automatically can open the file. thus all I need to do is change the variable and not have to edit the macro.
thanks so much
I can run a macro that opens a file as long as that path and file is static:
Workbooks.Open Filename:="C:\m ydoc\myfile\Dat a.xlsx", _
UpdateLinks:=3
suppose I have to move this file to a different path: C:\newdoc\newfi le\data.xlsx. My macro will not work unless I go in and edit the macro to reflect where the file is now located.
I prefer to somehow have some sort of variable say in an inputs worksheet so that whatever that variable contains the macro can read it and thus automatically can open the file. thus all I need to do is change the variable and not have to edit the macro.
thanks so much
Comment