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
 

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
12,979
Office Version
  1. 2013
Platform
  1. Windows
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
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Watch MrExcel Video

Forum statistics

Threads
1,127,203
Messages
5,623,348
Members
415,969
Latest member
Rey99

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
Top