Change a worksheet_change to a workbook_change code

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
655
I have a timestamp I've previously talked to people about. It's a worksheet_change item and I either need to make it into a macro that runs automatically (so when I input data into "R5" it puts a permanent, non-changing/updating timestamp "dd-mmm-yy" in "F4"

The fun part about this- it needs to add to sheets when the sheets are made- so I have a macro that creates a new sheet and formats the whole thing (talk about a long set of codes...). It also inserts all of the formulas into their respective cells. Now I need this timestamp to go in automatically when a new sheet is made and it can't just be a simple Now() as that would update each time the workbook is reopened.

Thanks!
 
sassriverrat;5177715Now why would that change make the difference?[/QUOTE said:
Before amendment, if the line "If Not Intersect(Target, Range("R8,W25")) Is Nothing Then" does not get triggered, thenEnableEvents does not get set back to True.
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
So the never ending fun.
Nearly finished with this project- this started producing errors again. It doesn’t want to .numberformat and says it can’t. Any ideas what might cause this?
 
Upvote 0
What line of code and exactly what error message?
 
Upvote 0
I got it working. I had mistakenly locked the sheet using vba and forgotten to put UserInterfaceOnly:=True problem solved.

However- I do have a new, open thread on a topic along the same lines. The worksheet_change is always looping, correct?
 
Upvote 0

Forum statistics

Threads
1,215,365
Messages
6,124,512
Members
449,167
Latest member
jrob72684

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top