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: 50
Default Save as crashes Excel - sometimes

I have this code in the ThisWorkbook object:

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

Dim Fname As Variant

Fname = Sheet1.Range("F3").Value & "-" & Sheet1.Range("F4").Value
Application.Dialogs(xlDialogSaveAs).Show Fname

End Sub

Where F3 & F4 are text values, i.e. the cells are formatted as text. The
cells contain a serial number and machine name, and so the file name is
concatenated as "0000-Machine Name.xls"

Sometimes on the file save event Excel (v2003) crashes. Most of the time it
doesn't. The code works like it is supposed to - but is there something
missing, or some error trapping I can add to prevent the crash?

Thanks!
 
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
Excel crashes on save Dan Excel Discussion (Misc queries) 2 January 9th 08 08:02 PM
Excel crashes when trying to save. Ori Excel Discussion (Misc queries) 2 August 21st 06 12:11 AM
Excel 2000 crashes when I save madthorn Excel Discussion (Misc queries) 0 June 6th 06 03:41 PM
Excel randomly crashes during save as Toni Excel Discussion (Misc queries) 0 April 4th 06 04:51 PM
Save As... crashes Excel Deane Yang Excel Programming 2 October 3rd 03 03:53 PM


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