LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Error When using ActiveWorkBook.SaveAs in Excel

I am trying to save an Excel workbook (that has a digital signature
applied if it makes any difference) in Excel 2003 SP2 via VBA using
the ActiveWorkbook.SaveAs command, however I get the follwoing error:

Microsoft Office Excel cannot access the file 'C:\Documents and
Settings\user\Desktop'. There are several possible reasons:
- The file name or path does not exist.
- The file is being used by another program.
- The workbook you are trying to save has the same name as a
currently open workbook.

This is my code residing in the ThisWorkBook module in VBA:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)

[Run some other code........................]

Dim fname As Variant
fname = Application.GetSaveAsFilename(FileFilter:="Save File As
(*.xls),*.xls", Title:="Save File As")
Application.DisplayAlerts = False
Application.EnableEvents = False

ActiveWorkbook.SaveAs fname

Application.DisplayAlerts = True
Application.EnableEvents = True
End Sub

I checked, and none of the above reasons seem to be true.

I have tried/checked the following things to no avail:
- Removed any add-ins in Excel
- Harcoded the full path/filename
- Tried saving a blank excel file with that simple line of code.
- Tried Me.SaveAs or ThisWorkbook.SaveAs
- Made sure the full file name and path were less than 200 characters
- Tried saving to other locations
- Not using IRM for Excel/Office
- Tried reinstalling office and all updates.
- Tried instyalling the hotfixes from MS KB Articles 919635 and 913770

I dont beleive this is a coding issue as it only occurs on a couple of
PC's.

Anyone have any ideas on how to fix this problem?

 
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.SaveAs Returns BHatMJ Excel Programming 3 May 19th 07 02:31 AM
ActiveWorkbook.SaveAs Problem SowBelly Excel Programming 4 August 4th 04 10:58 PM
activeworkbook.saveas J Silver Excel Programming 0 June 25th 04 09:01 PM
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


All times are GMT +1. The time now is 09:46 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"