I have an issue with activating a sheet from a user form, the same code works fine in Excel 2003 to Excel 2010, doesn\'t work with Excel 2013.
This is how to simply
I think Dima Reznikov has the right answer. I used his C# code and did it in VBA and it seems to fix the problem. My personal code also included the use of a Modal UserForm.
Example:
Sub Macro1()
Dim ws As Worksheet
Dim win As Window
'... bunch of code here...
ws.Activate
Set win = Application.ActiveWindow
win.Visible = False
win.Visible = True
End Sub
Hopefully this helps someone else who is also confused by the C# code.