Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel crashes on save | Excel Discussion (Misc queries) | |||
Excel crashes when trying to save. | Excel Discussion (Misc queries) | |||
Excel 2000 crashes when I save | Excel Discussion (Misc queries) | |||
Excel randomly crashes during save as | Excel Discussion (Misc queries) | |||
Save As... crashes Excel | Excel Programming |