how te close excel file automaticly with vb6 ???

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Dec 2007
Posts: 14
Reputation: P90K is an unknown quantity at this point 
Solved Threads: 1
P90K's Avatar
P90K P90K is offline Offline
Newbie Poster

how te close excel file automaticly with vb6 ???

 
0
  #1
Feb 7th, 2008
hi

i want to close an excel file.
i have already this code

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Windows("datamppm.xls").Activate
  2. ActiveWorkbook.Close savechanges:=True
  3. Application.Quit
  4. End

but when ik click te button to close the excel file.
excel gives an "error" that there are item on the clipboard.
en then i have to chose yes or no te save them.
en than the excel file closes.

but is there no way that the excel file closes automaticly whitout the "error" of excel.
that i type some code the vb chose automaticly.
the answer must always be no.

can somebody help me with this.
tankx
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: how te close excel file automaticly with vb6 ???

 
0
  #2
Feb 7th, 2008
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 14
Reputation: P90K is an unknown quantity at this point 
Solved Threads: 1
P90K's Avatar
P90K P90K is offline Offline
Newbie Poster

Re: how te close excel file automaticly with vb6 ???

 
0
  #3
Feb 7th, 2008
thanks for the replay

but that doesn't solve my problem.
the only explain how to open and close an excel file.
i need to now how i can answer "yes" or "no" automaticly when excel asks to save te clipboard.

any idea ????
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC