I have this macro
Sub RefreshWorkbook()
'PURPOSE: Retrieve data in sheets in ActiveWorkbook
Dim x As Integer
Dim sht As Worksheet
'Loop through all worksheets in ActiveWorkbook
For Each sht In ActiveWorkbook.Worksheets
'Retrieve Tab (if applicable)
x = HypRetrieve(sht.Name)
Next sht
'Notify User of Completion
MsgBox (“All sheets have been retrieved in this workbook”)
End Sub
#If VBA7 Then
Public Declare PtrSafe Function HypRetrieve Lib “HsAddin” (ByVal vtSheetName As Variant) As Long
#Else
Public Declare Function HypRetrieve Lib “HsAddin” (ByVal vtSheetName As Variant) As Long
#End If
and this attached excel file.
Initial.xlsx (103.0 KB)
I am trying to execute this macro on excel but its giving me Macro may not be available Error