![]() |
Save & Execution Problem
Hi, I have a general file which will be used by different people & saved under different names. When a button is pressed, the file imports data from other .xls and tabulated .txt files. My code (in english) says; 1. "Select txt file, copy contents" 2. "Select MyFile.xls, paste contents" Now if the file is saved as anything other than MyFile.xls, my code _won't_ work. But, I want it so that the user _can_ save it as any filename. I'm not too sure in which direction I should be heading. I appreciate any help anyone can offer. -- PLPE ------------------------------------------------------------------------ PLPE's Profile: http://www.excelforum.com/member.php...o&userid=23856 View this thread: http://www.excelforum.com/showthread...hreadid=383471 |
Save & Execution Problem
Hi PLPE,
Intead of using the the workbook name (MyFile.xls), use : ThisWorkbook The ThisWorkbook property returns the workbook holdimg the running code and is independent of any change to to the workbook name. --- Regards, Norman "PLPE" wrote in message ... Hi, I have a general file which will be used by different people & saved under different names. When a button is pressed, the file imports data from other .xls and tabulated .txt files. My code (in english) says; 1. "Select txt file, copy contents" 2. "Select MyFile.xls, paste contents" Now if the file is saved as anything other than MyFile.xls, my code _won't_ work. But, I want it so that the user _can_ save it as any filename. I'm not too sure in which direction I should be heading. I appreciate any help anyone can offer. -- PLPE ------------------------------------------------------------------------ PLPE's Profile: http://www.excelforum.com/member.php...o&userid=23856 View this thread: http://www.excelforum.com/showthread...hreadid=383471 |
All times are GMT +1. The time now is 12:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com