Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Closing File
Two questions:
1. I have a VBA app, that opens two files, merges the important data into one, then closes the file I don't need anymore. How can I get it to stop prompting me to save it, and to not ask me about the large amount of data left on the clipboard? 2. I know this isn't the right forum, but since I'm asking a question already, here goes. I wrote a VBA app in word to open an Excel file, load the data into an array, but it won't unload the excel file from memory. If I look at the task manager, the file is still open. (in the process of building this new app, I may have already figured this out, but haven't had the time to try it.) Thanks in advance. John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Closing File
John,
1. This will stop the closing prompt ActiveWorkbook.Close false this may stop the clipboard prompt. Not entirely sure though. application.displayalerts = false 2. You might need to show your code, but it should be something like Sub Test() Dim objExcel As Excel.Application Set objExcel = CreateObject("Excel.application") 'do something with your excel object Set objExcel = Nothing End Sub Robin Hammond www.enhanceddatasystems.com "John Viall" wrote in message ... Two questions: 1. I have a VBA app, that opens two files, merges the important data into one, then closes the file I don't need anymore. How can I get it to stop prompting me to save it, and to not ask me about the large amount of data left on the clipboard? 2. I know this isn't the right forum, but since I'm asking a question already, here goes. I wrote a VBA app in word to open an Excel file, load the data into an array, but it won't unload the excel file from memory. If I look at the task manager, the file is still open. (in the process of building this new app, I may have already figured this out, but haven't had the time to try it.) Thanks in advance. John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Closing File
1. set
Application.DisplayAlerts = FALSE befor ethe code that closes the file 2. make sure that you have code like ( assuming XLApp is dim's as the Excel Application object) XLApp.Quit SET XLApp = Nothing Exel DOES have a problem releasing memory until its quit. I wonder if Word has a similar issue? Haven't searched the KB, but it wouldn't surprise me as many Office components get shared amonst the Office applications. "John Viall" wrote: Two questions: 1. I have a VBA app, that opens two files, merges the important data into one, then closes the file I don't need anymore. How can I get it to stop prompting me to save it, and to not ask me about the large amount of data left on the clipboard? 2. I know this isn't the right forum, but since I'm asking a question already, here goes. I wrote a VBA app in word to open an Excel file, load the data into an array, but it won't unload the excel file from memory. If I look at the task manager, the file is still open. (in the process of building this new app, I may have already figured this out, but haven't had the time to try it.) Thanks in advance. John |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Closing File
Both worked, thanks.
"Patrick Molloy" wrote: 1. set Application.DisplayAlerts = FALSE befor ethe code that closes the file 2. make sure that you have code like ( assuming XLApp is dim's as the Excel Application object) XLApp.Quit SET XLApp = Nothing Exel DOES have a problem releasing memory until its quit. I wonder if Word has a similar issue? Haven't searched the KB, but it wouldn't surprise me as many Office components get shared amonst the Office applications. "John Viall" wrote: Two questions: 1. I have a VBA app, that opens two files, merges the important data into one, then closes the file I don't need anymore. How can I get it to stop prompting me to save it, and to not ask me about the large amount of data left on the clipboard? 2. I know this isn't the right forum, but since I'm asking a question already, here goes. I wrote a VBA app in word to open an Excel file, load the data into an array, but it won't unload the excel file from memory. If I look at the task manager, the file is still open. (in the process of building this new app, I may have already figured this out, but haven't had the time to try it.) Thanks in advance. John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Closing file with macro | Excel Discussion (Misc queries) | |||
Cannot find file upon closing | Excel Discussion (Misc queries) | |||
How to skip the save file notoification on file closing? | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
VBA closing one file | Excel Programming |