Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you're creating the workbook from a template (.xlt), then you can check the
path: Private Sub Workbook_Open() If ThisWorkbook.Path = "" Then 'never saved, just created else 'already saved once end if End Sub Jan wrote: Hi all I wrote some VBA code which should detect if the workbook has just been created through a template or already been saved (*.xls). When testing for the Saved property I was a little bit confused finding the value already set TRUE. Private Sub Workbook_Open() If ThisWorkbook.Saved = True Then 'jop - never been saved, empty path. saved is TRUE anyway??? GoTo WBSaved End If End Sub Has anybody an explanation for this or is it a bug (solution, workaround ?). There exist postings about confusing behaviour of 'Workbook.Saved' property value. But I didn't find a suitable solution for my problem, yet. Any ideas, suggestions? Thanks! -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I see a copy of a saved workbook before I saved it again? | Excel Worksheet Functions | |||
Catch _AfterSave Event & Saved Property Problem ... | Excel Programming | |||
Changing Workbook Property | Excel Programming | |||
'Saved' Property not working | Excel Programming | |||
Access to class property in other workbook | Excel Programming |