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?
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