WebQuery - XP(2000)=OK but Mac(X)=1004 Error ?

Nymor

New Member
Joined
Jul 16, 2007
Messages
5
Hi,

I have some code, which includes a WebQuery, that runs fine on my setup (XP & Excel 2000) but when a friend trys on his (Mac OS X & Excel X) he gets a 1004: Application-defined or object-defined error.

I read around this a bit, (and searched the archives) and while not finding anything that fixes it directly I did get a few pointers. I gather that Excel X is equivalent (in VBA terms) to XL97 and therefore the problem could that I'm using properties in mine that aren't supported on his. To that end I've stripped the code right down to just the WebQuery bit (subbed in Google as the page to get to make it even simpler) and the same still happens.

The macro is in a module (as opposed to behind a worksheet) and now just reads:-

Sub Get_Google_Page()

With ActiveSheet.QueryTables.Add(Connection:="URL;http://www.google.com", _
Destination:=Range("A1"))
.Name = "www.google"
.Refresh BackgroundQuery:=False
End With

End Sub


I believe there may be other issues as well in my real code but the above is an example of the bit that I'm stuck on at the moment.

Any help finding out what I need to change to make this run on my friends machine greatly appreciated.

Thanks
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,214,983
Messages
6,122,591
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top