Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default test for new, unsaved workbook

I want to test whether a workbook is a brand-new/never-been-saved, i.e.,
"Book 1." I notice that such books do not have a path yet. Is that a good
test? E.g.,

If ActiveWorkbook path = "" then
' it's never-been-saved

Doug


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default test for new, unsaved workbook

does this help?

If ActiveWorkbook.Saved Then
'do something
else
'do soemthing else
end if

--


Gary


"Doug Glancy" wrote in message
...
I want to test whether a workbook is a brand-new/never-been-saved, i.e.,
"Book 1." I notice that such books do not have a path yet. Is that a good
test? E.g.,

If ActiveWorkbook path = "" then
' it's never-been-saved

Doug



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default test for new, unsaved workbook

Gary,

No, because if I open a brand new workbook this is what I get in the
immediate window:

? workbooks("Book6").Saved
True

Since I'm only trying to test for brand-new, never-been-save workbooks, that
won't work, because it doesn't distinguish from a workbook that's been just
saved.

Thanks,

Doug

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
does this help?

If ActiveWorkbook.Saved Then
'do something
else
'do soemthing else
end if

--


Gary


"Doug Glancy" wrote in message
...
I want to test whether a workbook is a brand-new/never-been-saved, i.e.,
"Book 1." I notice that such books do not have a path yet. Is that a
good test? E.g.,

If ActiveWorkbook path = "" then
' it's never-been-saved

Doug





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default test for new, unsaved workbook

Hi Doug,

Your If ActiveWorkbook path = "" then test is fine.

---
Regards,
Norman



"Doug Glancy" wrote in message
...
I want to test whether a workbook is a brand-new/never-been-saved, i.e.,
"Book 1." I notice that such books do not have a path yet. Is that a good
test? E.g.,

If ActiveWorkbook path = "" then
' it's never-been-saved

Doug



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default test for new, unsaved workbook

Thanks Norman.

--
Doug


"Norman Jones" wrote in message
...
Hi Doug,

Your If ActiveWorkbook path = "" then test is fine.

---
Regards,
Norman



"Doug Glancy" wrote in message
...
I want to test whether a workbook is a brand-new/never-been-saved, i.e.,
"Book 1." I notice that such books do not have a path yet. Is that a
good test? E.g.,

If ActiveWorkbook path = "" then
' it's never-been-saved

Doug





Reply
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
Shared Workbook User had unsaved information disappear Aeryn635 Excel Worksheet Functions 1 January 15th 10 05:31 AM
How to recover unsaved workbook? P8ja Excel Discussion (Misc queries) 1 November 28th 05 12:44 PM
Change the name of an unsaved workbook? NooK[_43_] Excel Programming 3 August 3rd 04 03:27 PM
How to reference unsaved workbook in functions???? Art Vandalay Excel Programming 1 February 11th 04 11:01 PM
Closing an Unsaved (but Changed) Workbook Mike[_64_] Excel Programming 4 December 31st 03 01:07 AM


All times are GMT +1. The time now is 11:48 PM.

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"