Hi!
Am trying to run the following code from the ThisWorkbook module. However, I'm faced with the error: "Compile Error. Method or Data member not found."
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
If Success = True Then
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If Not (ws.Name = "Settings") Then ws.UpdateLastUpdate
Next ws
End If
End Sub
It calls the code from all the sheets (other than the Settings). They have the same code as per below.
Private sLastEdit As String
Sub UpdateLastUpdate()
Dim TimeZone As String
If GMT_ZONE >= 0 Then TimeZone = " (GMT+" & GMT_ZONE & ")" Else TimeZone = " (GMT" & GMT_ZONE & ")"
With Me.Range("ttLastUpdate")
.Formula = Format(sLastEdit, "MMM-DD, YYYY HH:MM")
.NumberFormat = """Last Update: ""MMM-DD, YYYY HH:MM""" & TimeZone & """"
End With
End Sub
Please help. Thanks
Bookmarks