Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unqualified References To The Application Object

Status
Not open for further replies.

maccten2000

Programmer
May 13, 2003
37
EU
Hi,

I am doing a project that involves exporting a queries Results from Access into an Excel Sheet and formatting it.

I am getting an error on the second time running the code which says this

Error 462: The remote server machine does not exist or is unavailable.

This I have found out from microsofts web site has something to do with unqualified References and can be fixed by qualifying my code which uses the Excel Object in this case. You can get more info from the article here


My problem is i dont know the qualifier for my code.

It crashes here on this line which is code used to search a line in excel to find the word 'PICK'

Code:
xlApp.Selection.Find(What:="PICKED", After:=ActiveCell, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate

xlApp has been Qualified to be equal to
CreateObject("Excel.Application")

Any help on this would be greatly appreciated as i have been working on it all day without success

Cheers
 
xlApp.Selection.Find(What:="PICKED", After:=[!]xlApp.[/!]ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top