title: Using SAPGUI in excel/VBA, Why does changing the .VerticalScrollbar.Position of a GuiTableControl breaks the object "connection"?
body: <p>First my test code</p>
  
  <pre><code>Sub mytest2()
  If Not IsObject(MyApplication) Then
     Set SapGuiAuto = GetObject("SAPGUI")
     Set MyApplication = SapGuiAuto.GetScriptingEngine
  End If
  If Not IsObject(Connection) Then
     Set Connection = MyApplication.Children(0)
  End If
  If Not IsObject(session) Then
     Set session = Connection.Children(0)
  End If
  If IsObject(Wscript) Then
     Wscript.ConnectObject session, "on"
     Wscript.ConnectObject MyApplication, "on"
  End If
  
  
  Dim MyTableStr As String
  Dim MyTable As Variant
  
  MyTableStr = "wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1107/tabsTS_1100/tabpVGUE/ssubSUB_AUFTRAG:SAPLCOVG:3010/tblSAPLCOVGTCTRL_3010"
  Set MyTable = session.findById(MyTableStr)
  MyTable.VerticalScrollbar.Position = MyTable.VerticalScrollbar.Position + 1
  Debug.Print MyTable.VerticalScrollbar.Position &amp; " position"
  </code></pre>
  
  <p>This code will increase the table's vertical position and then fail on the debug.print line with error "Object doesn't support this action" Run-time error 445</p>
  
  <p>If I add again the line</p>
  
  <pre><code>Set MyTable = session.findById(MyTableStr)
  </code></pre>
  
  <p>Between the .position line and the debug.print line, it works and the position gets printed.</p>
  
  <p>Why does this happen ?</p>