Can't 'activate'...for some reason I know not of....

nedbarra

New Member
Joined
Dec 3, 2018
Messages
18
Office Version
  1. 365
Have specially self-formatted 'accounts sheets' which I email clients for return when completed to suit current tax period.
These worksheets have relied on the 'activate' command to bring them to screen with basic vba and have been in use for some 10 years +
This is a primary command alongwith 'deactivate' which sends all monthly data to the respective sheets and has served me very well for the
period they've been in use.
The 'activate' command suddenly and strangely stopped functioning on Friday last and 'recovery' and updates have done nothing for the cause.
A working on the 'worksheet_open() event has only led to difficult thoughts as I'm not exactly a heavy vba user.
A command button would be the answer I suppose, but I most times don't want to be checking if the users have been 'pressing the button'
where and when they should have.
Any suggestions on replacing the 'activate' command with something equally as useful would be very much appreciated.
Set-out as follows

Private Sub worksheet_activate()
Application.ScreenUpdating = False
Application.DisplayAlerts = False

Me.ScrollArea = "A16:y56"
Application.ScreenUpdating = True
Worksheets("aug").Range("a1").Select

'description
Worksheets("aug").Range("c4").Select
ActiveCell.Value = ThisWorkbook.Sheets("prsnldet").Range("g28")
'business
Worksheets("aug").Range("f3").Select
ActiveCell.Value = ThisWorkbook.Sheets("prsnldet").Range("g26")
'start date
Worksheets("aug").Range("w4").Select
ActiveCell.Value = ThisWorkbook.Sheets("prsnldet").Range("n16")
'end date
Worksheets("aug").Range("w5").Select
ActiveCell.Value = ThisWorkbook.Sheets("prsnldet").Range("n18")

Application.EnableEvents = False
Worksheets("aug").Range("a1").Select
Application.ScreenUpdating = True

End Sub
 
Thanks again, JLGWhiz...

It appears to be working well and has changed my views on 'sheet_activate events'

Thank you for your time and trouble...and the more appropriate code setting you sent me...
I trust you will be fine and well if I were to use your better example when the occasion arises
If you have it working to your satisfaction, then that is what counts. Thanks for the feedback.
Regards, JLG
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,214,901
Messages
6,122,157
Members
449,068
Latest member
shiz11713

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