Active Member
May 4, 2019
This is the code I am using:
Sheets("Invoice").Select
Range("B12").Select
Selection.Copy
Sheets("Report").Select
erow = Sheet3.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Cells(erow, 5).Offset(-1, 0).Select
ActiveSheet.Paste
October 5, 2010
Hi Brian,
The code you pasted doesn't have any call to NOW() in it?
If you are calling NOW() from your macro then just check that the cell where the result from NOW() goes isn't blank, and don't call NOW() again :
If Range("A1") = "" Then
Range("A1") = Now()
End If
Regards
Phil
Active Member
May 4, 2019
Thanks kindly Phil, my apologies for the confusion I caused!
I have built an Excel invoice system that creates an invoice record for every client, saves it with that invoice number, then adds +1 to the invoice number & clears the form to ready it for the next client.
Just after the invoice saves in macro1, it copies & pastes certain fields of the invoice {for accounting purpose} in macro2, and places those cells into sheet3.
When it copies cell ("B12") which uses the =NOW() formula, it pastes it as the =NOW() formula {despite me not specifying to paste the actual value} so if you go into the report the next day, it displays the invoice date as that present day, not the original date of yesterday.
I am looking to add a command in the step2 macro to ensure the report date of that invoice record stays the same as the date it is posted.
Thanks very much for your help!!
1 Guest(s)