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 CreateCustomMenu()
Set myMenuBar = CommandBars.ActiveMenuBar
Set newMenu = myMenuBar.Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
newMenu.Caption = "Update"
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
With ctrl1
.Caption = "Refresh Data"
.TooltipText = "Refresh Data"
.Style = msoButtonCaption
.OnAction = "getdata"
End With
End Sub
Sub getdata()
Dim strPath As String, strName As String
strPath = ActiveWorkbook.Path
strName = ActiveWorkbook.Name
Application.ScreenUpdating = False
ActiveWorkbook.Close (False)
Workbooks.Open (strPath & "\" & strName)
End Sub