Hello,
I wrote a macro which should work internally in the file.
This file is copied (as a file) to the new one every week.
I noticed a problem, that my macro in the new (copied) file is references to the previous (original) file. It opens previous file and starts working.
I see that in the window Assign macro - there is automatically a path of file and then the macro name.
In my example the name of macro is: "KasujeKomentarze_3".
When I remove the path and click OK, it will be saved
but when I come back here again - the path is still visible
When I run macro in copied file from button, it open the previous Macro and run, not in this file.
When I run macro from the VB - it works properly in actual file.
In the code I used not direct reference like ThisWorkbook.Name.
What I'm doing wrong then?
I wrote a macro which should work internally in the file.
This file is copied (as a file) to the new one every week.
I noticed a problem, that my macro in the new (copied) file is references to the previous (original) file. It opens previous file and starts working.
I see that in the window Assign macro - there is automatically a path of file and then the macro name.
In my example the name of macro is: "KasujeKomentarze_3".
When I remove the path and click OK, it will be saved
but when I come back here again - the path is still visible
When I run macro in copied file from button, it open the previous Macro and run, not in this file.
When I run macro from the VB - it works properly in actual file.
In the code I used not direct reference like ThisWorkbook.Name.
What I'm doing wrong then?