Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Error using SaveAs (object disconnected from clients!) then XL Cra

Hi,

I have a macro workbook that opens two report templates, copies data into
them, creates subtotals and formatting, then saves the two reports using
SaveAs...

Unfortunately every time the code reaches the line:
Workbooks("Rep_Template1").SaveAs sRepName

or

Workbooks("IntRep_Template1").SaveAs sRepName

Surely these are correct references - they've worked fine for 5 years!

I get an error 'Automation Error The object invoked has disconnected from
its clients'

Excel then crashes with a memory leak or something...

This tool has been running finr for 5 years under Excel 97 and Excel 2000
and now I am getting this error.

Has anyone seen this, and how can I fix it...I've tried copying all the
sheets and VBA objects into a new workbook but that has not worked either...

I'd be grateful for any help

Philip
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Error using SaveAs (object disconnected from clients!) then XL Cra

I don't know about your problem, but i'll give you the code that works for me:

'open a new book - you'd open your template
Set newbook = Workbooks.Add

'perform whatever changes are needed


'then I generate a file name in an array using test number and date info
fnamearray = Array(testno, Format(Now, "yy-mm-dd hh.mm.ss"),
"xls")
fname = Join(fnamearray, ".")

'then save it
newbook.SaveAs Filename:=fname

This works. How it relates to your problem I don't know . Good luck!
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
help please!!! error "object invoked has disconnected from its cli Valeria Excel Programming 0 November 25th 04 09:49 AM
"Object disconnected from clients"?? Ed[_9_] Excel Programming 1 November 13th 03 05:25 PM
Automation Error: The Object Invoked Has Disconnected from Its Clients (Excel) Vaibhav Excel Programming 0 September 8th 03 04:57 PM
Automation Error: The Object Invoked Has Disconnected from Its Clients Vaibhav Dandavate Excel Programming 0 September 8th 03 04:05 PM


All times are GMT +1. The time now is 03:06 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"