Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Problem using GetObject()

Hi,
In my VB Excel Application, I use "GetObject()" to open a workbook, reading
a range in a worsheet, all that being invisible to the user. And then I
close the workbook.
I have to do this several times (getobject, reading a range, closing) in the
same run; it seems to me that the repetition of this cycle is source of
trouble.
After the second or third sequence, I get an error message "Error 1004 - The
'Range' method of '_Global' object failed.".
Thanks I you could help.
--
Jean-Pierre Bidon
Interstat
5 place de la République
75003 Paris
Tél: 01 45 49 19 17


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Problem using GetObject()

I suspect excel is never being released. with your application still
running, look in the task manager and see if you have residual copies of
excel running. If so, you need to clean up your code to release excel.

--
Regards,
Tom Ogilvy


"Jean-Pierre Bidon" wrote:

Hi,
In my VB Excel Application, I use "GetObject()" to open a workbook, reading
a range in a worsheet, all that being invisible to the user. And then I
close the workbook.
I have to do this several times (getobject, reading a range, closing) in the
same run; it seems to me that the repetition of this cycle is source of
trouble.
After the second or third sequence, I get an error message "Error 1004 - The
'Range' method of '_Global' object failed.".
Thanks I you could help.
--
Jean-Pierre Bidon
Interstat
5 place de la République
75003 Paris
Tél: 01 45 49 19 17



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Problem using GetObject()

Thanks Tom,
Excel is still running between each execution of the cycle (getobject,
reading, closing), it is normal as it is a VB Excel application and that
there is a workbook open all the time (this open workbook is not the one I
try to open with GetObject, it is another one).
However, I check with the task manager of windows, and there is one, and
only one, instance of Exel running. However, when I close the "GetObject"
workbook each time, it seems as if it were not "well" closed when I reopen
it later.

"Tom Ogilvy" a écrit dans le message
de news: ...
I suspect excel is never being released. with your application still
running, look in the task manager and see if you have residual copies of
excel running. If so, you need to clean up your code to release excel.

--
Regards,
Tom Ogilvy


"Jean-Pierre Bidon" wrote:

Hi,
In my VB Excel Application, I use "GetObject()" to open a workbook,
reading
a range in a worsheet, all that being invisible to the user. And then I
close the workbook.
I have to do this several times (getobject, reading a range, closing) in
the
same run; it seems to me that the repetition of this cycle is source of
trouble.
After the second or third sequence, I get an error message "Error 1004 -
The
'Range' method of '_Global' object failed.".
Thanks I you could help.
--
Jean-Pierre Bidon
Interstat
5 place de la République
75003 Paris
Tél: 01 45 49 19 17





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetObject with Password [email protected] Excel Programming 7 March 30th 06 11:51 AM
GetObject Maxi[_2_] Excel Programming 0 March 14th 06 10:23 AM
GetObject error 429 Brian Delaney Excel Programming 3 August 23rd 05 03:37 PM
GetObject function R Avery Excel Programming 3 October 5th 04 07:20 PM
GetObject Michael Excel Programming 3 June 16th 04 01:28 PM


All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"