Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
GM GM is offline
external usenet poster
 
Posts: 23
Default Always prompted for Save with function

I have this function in a module, however if I open the workbook and make no
changes to it and go to close it I am always prompted to save yes or no. How
can I fix this?
Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


TIA
GM

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Always prompted for Save with function

Don't make it Volatile.

--
Regards,
Tom Ogilvy


"GM" wrote in message
...
I have this function in a module, however if I open the workbook and make

no
changes to it and go to close it I am always prompted to save yes or no.

How
can I fix this?
Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


TIA
GM



  #3   Report Post  
Posted to microsoft.public.excel.programming
GM GM is offline
external usenet poster
 
Posts: 23
Default Always prompted for Save with function

Thanks Tom perfect

"Tom Ogilvy" wrote:

Don't make it Volatile.

--
Regards,
Tom Ogilvy


"GM" wrote in message
...
I have this function in a module, however if I open the workbook and make

no
changes to it and go to close it I am always prompted to save yes or no.

How
can I fix this?
Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


TIA
GM




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Always prompted for Save with function

I am not sure it is perfect, because the point of the Volatile is to force
the function to update. You might need to come up with a cleaver time to
force a calculatefull - however, you would again have to avoid doing it when
no changes are made to the workbook.

Possibly You could do it in the workbook open event, then set

ThisWorkbook.Saved = True

at the end of the event.

Not up on events, see Chip Pearson's site for an overview
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"GM" wrote in message
...
Thanks Tom perfect

"Tom Ogilvy" wrote:

Don't make it Volatile.

--
Regards,
Tom Ogilvy


"GM" wrote in message
...
I have this function in a module, however if I open the workbook and

make
no
changes to it and go to close it I am always prompted to save yes or

no.
How
can I fix this?
Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


TIA
GM






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
Prompted to save hetherjw Excel Discussion (Misc queries) 5 October 27th 05 06:22 PM
Why Prompted To Save Again? Izar Arcturus Excel Programming 3 December 17th 03 05:02 PM
Prompted to save changes after macro save - why? Izar Arcturus Excel Programming 2 December 10th 03 09:27 PM
Save as CSV without being prompted Tom Ogilvy Excel Programming 0 July 18th 03 12:05 AM
Save as CSV without being prompted Randall Arnold[_2_] Excel Programming 0 July 17th 03 10:36 PM


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