View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
des-sa[_2_] des-sa[_2_] is offline
external usenet poster
 
Posts: 74
Default is there a way to change a formula to a value

thank you Gord - works 100%

can i now push my luck. i have 2 buttons, each with a macro attached to it.
one for saving the file with the date and document number as file name, the
other to print the document.

could it not be possible to have a macro or vba script attached to a single
button which, when pressed, print 2 copies of the document, saves the
document and closes it.

"Gord Dibben" wrote:

With Workbook event code, either BeforeSave or Workbook_Open.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
With Sheets("Sheet1").Range("A10")
..Value = .Value
End With
End Sub


Gord Dibben MS Excel MVP

On Wed, 14 May 2008 07:54:02 -0700, des-sa
wrote:

is there a way to change a cell's contents, upon saving the file, from a
formula to a value. or as soon as the file has opened.
thanks