Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Do you want to reopen...

  Asked By: Pamela    Date: Jan 19    Category: MS Office    Views: 655
  

I have some VB6 code which opens an existing Excel spreadsheet
"CSR.xls" and inputs some data into some cells.
It works pretty well for most of my group using Excel 97.
At least two users with Excel 2003 (11.x) on the other hand, get this
message everytime:
"CSR.xls is already open. Reopening will cause any changes you made to
be discarded. Do you want to reopen CSR.xls?"
(I actually have seen this a number of times on other computers too,
but with little consequence).
In this case it doesn't matter if you click Yes or No, Excel won't
work either way and hangs around waiting to be closed via the Task
Manager, where it is only visible in processes tab.
I am able to open that file successfully by double-clicking the file
via Explorer.
There are macros in it too, so I've set Excel to medium security.
I've been searching without success for clues into this.
Any suggestions?
If you are wondering how I'm opening Excel, here's some stripped-down
code:
Dim xlApp As Object
Dim xlWB As Object
Set xlApp = GetObject(, "excel.application")
Set xlWB = xlApp.Workbooks.Open([filespec])
One clue may be the last err.description I trap (in my VB6 code):
"Object doesn't support this property or method".

Share: 



Tagged: