An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.
One of a set of tools we're offering as a way of saying thank you for being a part of the community.
I take it that you have set the ScrollBars Property to 3 - FlexScrollBarBoth and that you want to determine when which ones are showing.
Because the scroll bars automatically appear I would think you would need to calculate the Combined height of all the rows to determine if the Horitontal bar is showing and calculate the Combined Width of all the columns to determine if the Vertical scroll bar is showing.
You Could try this. I have tested it and it works fine.
Private Sub Command1_Click()
Dim i As Integer
Dim Width As Integer
Dim Height As Integer
i = 0
For i = 0 To MSFG.Rows - 1
' MSFG.Row = i
Height = Height + MSFG.RowHeight(i)
Next i
i = 0
For i = 0 To MSFG.Cols - 1
' MSFG.Row = i
Width = Width + MSFG.ColWidth(i)
Next i
If MSFG.Height < Height Then
'Hozizontal scroll bar being displayed
MsgBox Height & " - Horizontal Bar Being Displayed"
End If
If MSFG.Width < Width Then
'Vertical scroll bar being displayed
MsgBox Width & " - Vertical Bar Being Displayed"
End If
End Sub
Cheers,
Ed.