Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Error on Save As

Hi This is driving me nuts!
I am working on a file I want to save as an xlt, and once the user has
entered all the data on the form I want them to click a button that will
result in the file being printed, saved, emailed and closed. print & email
sorted, but saving is giving me grief!
I looked at other posts, and I copied some neat code to get up a chose
folder dialog box, and then I add the file name (from a couple of cells) and
currently use:
ThisWorkbook.SaveAs Filename:=path & "\" & client
Excel then crashes and closes.
Run Time Error '2147417848(80010108)'
Automation Error The Object has disconected from its client

Please what am I doing wrong!
TIA
Graham Y

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Error on Save As

Graham - perhaps something is wrong with your path/client variables?
I tried this and it works for me:

Sub zzz()
Dim path As String, client As String
path = "c:\temp"
client = "z.xls"
ThisWorkbook.SaveAs Filename:=path & "\" & client
End Sub

try seeing what your Filename variable is - enter this before your SaveAs
line:
msgbox path & "\" & client
this will visually show you what you are passing to the SaveAs object -
perhaps it's not quite what you think it is.




"Graham Y" wrote:

Hi This is driving me nuts!
I am working on a file I want to save as an xlt, and once the user has
entered all the data on the form I want them to click a button that will
result in the file being printed, saved, emailed and closed. print & email
sorted, but saving is giving me grief!
I looked at other posts, and I copied some neat code to get up a chose
folder dialog box, and then I add the file name (from a couple of cells) and
currently use:
ThisWorkbook.SaveAs Filename:=path & "\" & client
Excel then crashes and closes.
Run Time Error '2147417848(80010108)'
Automation Error The Object has disconected from its client

Please what am I doing wrong!
TIA
Graham Y

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Error on Save As

It appears that there is a bug in VBA. I looked up the error code and it
suggests it has to do with late binding, in VB projects, and it looks as if
this is a related problem, even without doing the save as just using a
msgbox, when I quit the app I cannot get to another module or form by double
clicking it in the VBA IDE.
I've tried to install updates but it's asking for my Office disk, which I
can't find! I'll have to keep hunting, or do this at work not home!

But thanks for the suggestion.

"Dion" wrote:

Graham - perhaps something is wrong with your path/client variables?
I tried this and it works for me:

Sub zzz()
Dim path As String, client As String
path = "c:\temp"
client = "z.xls"
ThisWorkbook.SaveAs Filename:=path & "\" & client
End Sub

try seeing what your Filename variable is - enter this before your SaveAs
line:
msgbox path & "\" & client
this will visually show you what you are passing to the SaveAs object -
perhaps it's not quite what you think it is.




"Graham Y" wrote:

Hi This is driving me nuts!
I am working on a file I want to save as an xlt, and once the user has
entered all the data on the form I want them to click a button that will
result in the file being printed, saved, emailed and closed. print & email
sorted, but saving is giving me grief!
I looked at other posts, and I copied some neat code to get up a chose
folder dialog box, and then I add the file name (from a couple of cells) and
currently use:
ThisWorkbook.SaveAs Filename:=path & "\" & client
Excel then crashes and closes.
Run Time Error '2147417848(80010108)'
Automation Error The Object has disconected from its client

Please what am I doing wrong!
TIA
Graham Y

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
CSV error when trying to save Brandon G Excel Discussion (Misc queries) 3 March 23rd 10 11:13 PM
Save As Error Ayo Excel Discussion (Misc queries) 2 March 23rd 08 05:50 PM
Subscript out of range error - save copy error bg18461[_16_] Excel Programming 2 June 13th 06 04:53 PM
Subscript out of range error - save copy error bg18461[_15_] Excel Programming 1 June 13th 06 04:36 PM
Excel Save Error crazy22 Excel Discussion (Misc queries) 1 September 9th 05 11:43 PM


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