Trying to change the currently activateworksheet within a workbook. I have modified code on the appropriate worksheet and can see this but cannot change the currently activateworksheet to ensure that this tab is the displayed one.
Am I missing something ?
Dim SourceTab = ComboBox3.Text
If String.IsNullOrWhiteSpace(SourceTab) Then
Exit Sub
End If
'Some code to change the content on the Spreadsheet2.Workbook.Worksheets(SourceTab)
Spreadsheet2.ActiveSheet = Spreadsheet2.Workbook.Worksheets(SourceTab)
Spreadsheet2.Workbook.Worksheets(SourceTab).Activate()