View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jan[_17_] Jan[_17_] is offline
external usenet poster
 
Posts: 2
Default workbook.saved property

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!