Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default activeworkbook.saveas

I found the problem. It turns out that one of the sub folders in my save path was protected. This caused the SaveAs to fail. It did not get a message informing me of the failure. When I put the code in debug mode and looked at Err.Description just after the call, I discovered the problem.

Thanks anyway.

"J Silver" wrote:

Hello,
I am using VBA within Excel 2000. The ActiveWorkBook 'SaveAs' method is working properly. In an older version of my spreadsheet (Excel 2000), the SaveAs method works properly (i.e., if the specified save path/file name is different from the active workbook, a new file is created with the new path/file name and the title bar changes to the new file name). With my spreadsheet, the 'SaveAs' method automatically reverts to lower case (as if it is not recognized as a valid method), the file is saved with the active workbook name, and the title bar does not reflect the new name). Here is the code I am trying to execute. The same code works properly in the older spreadsheet (and 'SaveAs' remains in mixed case).

Original code:
================================
Dim SaveFileName
SaveFileName = "c:\time_sheets\time 2004-06-24"
ActiveWorkbook.SaveAs Filename:=SaveFileName
================================

New code:
================================
Dim SaveFileName
SaveFileName = "c:\time_sheets\time 2004-06-24"
ActiveWorkbook.saveas Filename:=SaveFileName
================================

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
ActiveWorkBook Pete Excel Discussion (Misc queries) 3 May 9th 05 04:14 PM
Max charactors for 'ActiveWorkbook.SaveAs Filename'? TOMB Excel Worksheet Functions 1 February 16th 05 06:44 AM
Error on ActiveWorkbook.SaveAs method cruisy Excel Programming 3 May 17th 04 08:40 AM
Error on ActiveWorkbook.SaveAs method Tim Zych[_8_] Excel Programming 0 May 17th 04 06:33 AM
ActiveWorkbook.Close Matthew[_9_] Excel Programming 4 November 13th 03 02:48 AM


All times are GMT +1. The time now is 12:41 AM.

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

About Us

"It's about Microsoft Excel"