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.
Sub CustomPopup()
Dim CBar As CommandBar
Dim CBarCntrl As CommandBarButton
Set CBar = CommandBars("Text")
Set CBarCntrl = CBar.Controls.Add
With CBarCntrl
.Style = msoButtonCaption
.Caption = "My Custom Control"
.OnAction = "MyCustomControl"
End With
End Sub
Sub MyCustomControl()
' Your code here.
MsgBox "Inside Custom Control Handler", vbInformation + vbOKOnly, "Custom Control"
End Sub