Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Need Macro To Close Excel Application

I use "Scheduled Tasks" to open Excel and them populate the fields with an
XML file that I download daily via an FTP site. I have been able to open the
XML file and transform it to an Excel foramt that is then imported into
Access for database management. It works great!

After I run the macro to run Excel and import the XML data and save the
file, it then "closes" the file. But, I would also like to "close" the excel
application until it is needed the next day.

After I"close" the wooksheet, how can I "close" the Excel application?

Thanks in advance your your assistance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Need Macro To Close Excel Application

Thanks Tushar..but one more question. Following is the code, but I can't get
the app to close. Can you help?

Sub Auto_Open()
'
' Auto_Open and Auto_Close Macro
' Macro recorded 11/14/2004 by MarySue
'

'
Range("D2").Select
ActiveWorkbook.XmlMaps("OrderFile_Map").DataBindin g.Refresh
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.Quit

End Sub

Thanks in advance for your help

"Tushar Mehta" wrote:

Application.Quit

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I use "Scheduled Tasks" to open Excel and them populate the fields with an
XML file that I download daily via an FTP site. I have been able to open the
XML file and transform it to an Excel foramt that is then imported into
Access for database management. It works great!

After I run the macro to run Excel and import the XML data and save the
file, it then "closes" the file. But, I would also like to "close" the excel
application until it is needed the next day.

After I"close" the wooksheet, how can I "close" the Excel application?

Thanks in advance your your assistance.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need Macro To Close Excel Application

Assume this code is in the ActiveWorkbook. If so, when you close the
workbook, the code stops running. So you need to depend on Excel to close
the workbook:

Sub Auto_Open()
'
' Auto_Open and Auto_Close Macro
' Macro recorded 11/14/2004 by MarySue
'

'
Range("D2").Select
ActiveWorkbook.XmlMaps("OrderFile_Map").DataBindin g.Refresh
ActiveWorkbook.Save
Application.Quit

End Sub

--
Regards,
Tom Ogilvy

"MarySue" wrote in message
...
Thanks Tushar..but one more question. Following is the code, but I can't

get
the app to close. Can you help?

Sub Auto_Open()
'
' Auto_Open and Auto_Close Macro
' Macro recorded 11/14/2004 by MarySue
'

'
Range("D2").Select
ActiveWorkbook.XmlMaps("OrderFile_Map").DataBindin g.Refresh
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.Quit

End Sub

Thanks in advance for your help

"Tushar Mehta" wrote:

Application.Quit

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I use "Scheduled Tasks" to open Excel and them populate the fields

with an
XML file that I download daily via an FTP site. I have been able to

open the
XML file and transform it to an Excel foramt that is then imported

into
Access for database management. It works great!

After I run the macro to run Excel and import the XML data and save

the
file, it then "closes" the file. But, I would also like to "close"

the excel
application until it is needed the next day.

After I"close" the wooksheet, how can I "close" the Excel application?

Thanks in advance your your assistance.





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
Trying to close Excel Application in IE Pommy Excel Discussion (Misc queries) 3 November 24th 05 03:36 PM
close excel application. VJ Excel Programming 3 October 22nd 04 03:00 AM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
unable to close macro using auto_close or application.quit gloria Excel Programming 1 January 14th 04 07:50 AM


All times are GMT +1. The time now is 06:56 PM.

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"