hi there,
I am struck across a macro where i need the cell "B2" of "Sheet1" to be updated with the current date in mm.dd.yyyy format only when we save the sheet
Thanx in advance
hi there,
I am struck across a macro where i need the cell "B2" of "Sheet1" to be updated with the current date in mm.dd.yyyy format only when we save the sheet
Thanx in advance
ThisWorkbook module
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If ThisWorkbook.Saved = False Then ThisWorkbook.Worksheets("Sheet1").Range("B2").Value = Date End If End Sub
I guess it's not working...
What is that supposed to mean to us? You need to understand that:
1. We cant see your workbook because you didn't attach one to review,
2. We are unable to review your code as you didn't post any,
3. You then post a completely irrelevant statement such as "I guess its not working".
Since you are asking for assistance, try the following:
1. Post your workbook, with the relevant section of code that is failing,
2. Indicate which line/s the code errors out on,
3. List any error messages you are seeing.
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link