An obsure application or object defined error problem

J

Josh Sale

One of my users has reported a pretty obscure problem. Here's the deal:

- They're running my Excel add-in under Excel 2002 on a Citrix server.

- The code executes a statement like the following:

Set tempBook = Workbooks.Open(tempName, , True, , , , True, , , , , ,
False)

where tempname is a fully qualified name (e.g., "c:\docume~1\ ...").

- Normally this works just fine.

- However, if the user does a File | Open from Excel, chooses the "T" drive
(which apparently Citrix maps back to their local "C" drive), navigates to a
text file and chooses that file which causes Excel to run it text import
wizard (which seems to work just fine).

- If they then switch back my application's workbook and do something which
causes the above Workbooks.Open to run, it now fails with an Application or
Object defined error (1004).

- I've inspected the contents of tempName in both the working and failing
cases and its the identical text string and I've verified that in both cases
the .xls file pointed to by tempName exists in the appropriate directory.

- Perhaps one small clue is that if I drop off the trailing False argument
(AddToMRU) then the Open always works! But then my code fails downstream
the next time it tries to Open a file ... and besides I really don't want
this opened file added to the MRU list.

Yikes!

Thanks for any suggestions.

josh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top