This bahavior happens when running a macro using a "new macro button" in the SW UI or when hitting the "run sub" play button in VB for Applications. If I run a macro using a "Run Macro" button in the SW UI or from Tools/Add-Ins/Macros/Run, it works fine.
Here's the code:
Code: Select all
Option Explicit
Sub main()
Debug.Print "HELLO WORLD"
End Sub
I experience this behavior if I have cell, row, column, or range in a table selected. If I instead select the entire table, it works fine.
It doesn't matter what kind of table (General, Revision, BOM, etc).
Since the solution is to simply click on my macro-run button a second time, it's not the end of the world, but it is creating a lot of confusion among other SW users since this behavior is unexpected and unexplainable.
I have experienced this behavior in both 2017 SP 5.0 and 2022 SP 5.0