View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
chillihawk chillihawk is offline
external usenet poster
 
Posts: 9
Default Save workbook via Command Button????

Do you mean you have a file you want to save called 'Midtown Farm' and
you want to append the date in cell 'A5' to the end of the filename?
If so and the onClick event of the command button triggers the save
operation then you could do something like this:

Private Sub CommandButton1_Click()

Dim sDate as string

sDate = Format(Activesheet.Range("A5").Value, "yyyymmdd")

Thisworkbook.SaveAs "Midtown Farm_" & sDate

End Sub