Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save problem | Excel Discussion (Misc queries) | |||
Save as problem with Save In drop down box | Excel Discussion (Misc queries) | |||
macros execution problem | Excel Programming | |||
Save problem | Excel Programming | |||
Problem with 'For' loop execution [VBA,Excel XP] | Excel Programming |