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
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