Screenupdating in Workbook_Open

Shiremaid

Board Regular
Joined
Jun 18, 2013
Messages
73
Our IT department recently updated our intranet/sharepoint and some of my files stored there for my department are now behaving differently.
A sheet I was unhiding ("Guide") based on user name is now the sheet it always opens to even though it's not the last thing that happens in the macro (a shape on another page is also unhidden)
I tried putting in
Application.ScreenUpdating = False
Application.ScreenUpdating = True
before and after the code as I had for other macros in the book to keep the sheet from changing but it isn't working. Does that code not work in auto-run macros? Or could it have something to do with the fact that the files are now being run "from the internet" and the running is being interrupted with a warning about internet files?
Is there any other way I can prevent the workbook from moving the the sheet I am unhiding or return it to the previously active sheet like it used to before the update?

Code:
Application.ScreenUpdating = False
If UserName = "username" Then
Sheets("Guide").Visible = True
Sheets("REPORTS").Shapes("Add").Visible = True

Else
'do nothing
End If
Application.ScreenUpdating = True
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Apart from taking the IT team to task, has your user name changed subtly with a different log in ?
 
Upvote 0
Ha, they already did that to us when they updated us to Windows 10 >.< Had to go through and update a whole bunch of things with the new user names.
Fortunately one of our IT guys does seem to have found a way to reconnect us that has put a stop to the problem.
 
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

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