Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
dim bytBars as Byte
bytBars = Me.Form.Scrollbars
If bytBars = 0 Then
msgbox "There are currently no scrollbars detected."
Else
msgbox "There is at least one scrollbar detected."
End If
Are you talking about the verical scrollbar put onto a grid automatically
Option Compare Database
Option Explicit
Private Const GWL_STYLE = (-16)
Private Const WS_HSCROLL = &H100000
Private Const WS_VSCROLL = &H200000
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Sub testScroll()
Dim wndStyle As Long
' Retrieve the window style of the control.
wndStyle = GetWindowLong(Form_Form1.hwnd, GWL_STYLE)
Debug.Print wndStyle & " " & WS_VSCROLL & " " & WS_HSCROLL
' Test if the horizontal scroll bar style is present
' in the window style, indicating that a horizontal
' scroll bar is visible.
If (wndStyle And WS_HSCROLL) <> 0 Then
'MsgBox "A horizontal scroll bar is visible."
Else
' MsgBox "A horizontal scroll bar is NOT visible."
End If
' Test if the vertical scroll bar style is present
' in the window style, indicating that a vertical
' scroll bar is visible.
If (wndStyle And WS_VSCROLL) <> 0 Then
'MsgBox "A vertical scroll bar is visible."
Else
'MsgBox "A vertical scroll bar is NOT visible."
End If
End Sub