Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save problem Nikki Excel Discussion (Misc queries) 4 June 29th 07 03:46 PM
Save as problem with Save In drop down box Doug Excel Discussion (Misc queries) 3 March 16th 06 02:46 PM
macros execution problem Lolly[_2_] Excel Programming 1 April 7th 05 02:42 PM
Save problem MikeR[_2_] Excel Programming 2 August 25th 04 10:48 AM
Problem with 'For' loop execution [VBA,Excel XP] Angelos Markos Excel Programming 2 July 22nd 04 04:46 PM


All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"