On 19 Jul., mohd ateeq wrote:
> > > HI all,
> > > Can anyone help me out with the following error:
> > > Run-time error ‘-2147417848 (80010108)’:
> > > Automation error
> > > The object invoked has disconnected from its clients
> > > It occurs when I create around 30-40 new excel files based on some
> > criteria
> > > and update as and when there is a updates by opening each excel file and
> > > update using the vba code.
> > > When this error occurs, there will be a one more file created with a junk
> > > name like 7EA78f10 ……and shows a save as dialogue box, when I click on
> > > cancel the above error message is displayed and when I save that file, it
> > > says “Excel has encountered a problem and need to close and it will start
> > > recovering the files again.
> > > Please help me out
> > > Thanks…

On Jul 20, Stuart Redmann wrote:
> > This error message indicates that something very fundamental is going
> > wrong. Usually you will only get it if there is a COM server (for
> > example Excel) that houses some COM objects (your Excel workbooks)
> > shuts unexpectedly down (IOW, Excel crashes). Since it is quite easy
> > to make Excel crash, it will be quite hard to find out what exactly
> > causes the crash. The "7EA78f10" file you have mentioned may be a clue
> > which of the opened Excel files caused the crash (this file is
> > certainly the result from an auto-recover of Excel).
> >
> > However, we need _much_ more information about what you are doing,
> > best of all a minimal example that exposes the behaviour. Do you
> > create the new Excel files in a separate Excel server? If so, have you
> > enabled macro processing in these servers?


On Aug 2, mohd ateeq wrote:
> Actually i have a excel file in which there are names written of all the
> operators and each operator will have a excel file.
>  In the macro code it will select a file usin the application.open method
> then it will calculate the data accordin to the criteria specified. After
> that it will open each excel file and update the data respectively.
>
> This error occurs at times while updatin the data. but no error is specified
> the only thing is it shows a save as dialogue box with the junk name i have
> specified before but when i click on cancel or save, the excel crashes.

There is one thing that might work in this case: Instead of the line

  Application.Open

you could create a new Excel server:

  Dim NewExcelApp As Excel.Application
  Set NewExcelApp = New Excel.Application
  NewExcelApp.AutomationSecurity = msoAutomationSecurityForceDisable

Then you can open the workbook of the operators in the newly created
application like this:

  dim OperatorWorkbook as Excel.Workbook
  set OperatorWorkbook = NewExcelApp.Open ("<FileNameForOperator>.xls)
  ' Do whatever needs to be done for the operator.

This worked for me when Excel used to crash in a reproducible fashion.
In my case I tried to insert macro code into another worksheet (which
works like a charm as long as macro processing is turned off for this
worksheet).

Regards,
Stuart

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to