MrKowz
Well-known Member
- Joined
- Jun 30, 2008
- Messages
- 6,653
- Office Version
- 365
- 2016
- Platform
- Windows
Good day, everyone!
I'm in an environment that is running two different versions of Excel. Excel 2016 and O365. I developed a utility which has three data connections to other Excel files, and these data connections are causing me issues.
In Excel 2016, I've recently discovered that when a data connection is refreshed, the worksheet holding that data is activated. In O365 (with no code changes), these data connections silently refresh (i.e. the tabs are never activated).
Current code:
Expected/Desired Outcome: The worksheet "Welcome" is activated after all connections are refreshed.
Current/Undesired Outcome: Each worksheet that has a connection is being "Activated" after code execution finishes.
Anyone have a workaround? Thanks much in advance!
I'm in an environment that is running two different versions of Excel. Excel 2016 and O365. I developed a utility which has three data connections to other Excel files, and these data connections are causing me issues.
In Excel 2016, I've recently discovered that when a data connection is refreshed, the worksheet holding that data is activated. In O365 (with no code changes), these data connections silently refresh (i.e. the tabs are never activated).
Current code:
VBA Code:
Private Sub Workbook_Open()
ThisWorkbook.RefreshAll
DoEvents
Sheets("Welcome").Activate
End Sub
Expected/Desired Outcome: The worksheet "Welcome" is activated after all connections are refreshed.
Current/Undesired Outcome: Each worksheet that has a connection is being "Activated" after code execution finishes.
Anyone have a workaround? Thanks much in advance!