I am trying to scrape data from web from my app in access but I couldn’t find a perfect way to do it.
however It’s working perfectly from excel macro using querytable function
i am trying to run a code from access to run a macro for me to get the result into excel then take them back to my code in access
But I am getting error on the object (able(querytable)
Error: object required
Do you have any suggestions how I can make this happen
Public Function runExcelMacro(wkbookPath)
Dim url As String
url="https: //mywebsite"
Dim XL As Object
Dim table As QueryTable
Set table
Sheetl.QueryTables.Add ("URL;" & url, Sheetl.Range ("Al") )
With table
.WebSelectionType
xlSpecifiedTables
.WebTables="1"
.WebFormatting= xlWebFormattingAll
. Refresh
End With
End Function
however It’s working perfectly from excel macro using querytable function
i am trying to run a code from access to run a macro for me to get the result into excel then take them back to my code in access
But I am getting error on the object (able(querytable)
Error: object required
Do you have any suggestions how I can make this happen
Public Function runExcelMacro(wkbookPath)
Dim url As String
url="https: //mywebsite"
Dim XL As Object
Dim table As QueryTable
Set table
Sheetl.QueryTables.Add ("URL;" & url, Sheetl.Range ("Al") )
With table
.WebSelectionType
xlSpecifiedTables
.WebTables="1"
.WebFormatting= xlWebFormattingAll
. Refresh
End With
End Function
Last edited: