Hi
I am trying to save my workbook auto macro on my doc with date and name but am getting this error all the time and i am using window office 2003
thanks
Code
Private Sub Workbook_Open()
Call StartClock
Call HideAllSheets
Range("a55").Select
ActiveCell = Application.UserName
Range("a56").Select
ActiveCell = Format(Now, "dd,mm,yyyy")
Range("a59").Select
ActiveCell = Format(Now, "hh:mm")
End Sub
Private Sub Workbook_BeforeClose(cancel As Boolean)
Call StopClock
Dim answer As String
Dim question As String
question = "Do you want to save this workbook"
answer = MsgBox(question, vbYesNo)
If answer = vbYes Then
ActiveWorkbook.SaveAs Filename:="H:\DataBase4" & "DataBase4 " & "" & Format(Date, "dd-mm-yyyy") & "" & Range("A56").Value & ".xls"
Else
ActiveWorkbook.Close SaveChanges:=False
End If
End Sub
Display More
am getting this error : compile error expected variable or procedure not module