View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
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