Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MDW MDW is offline
external usenet poster
 
Posts: 117
Default Hanging Instances Of EXCEL.EXE?

Hey all,

I'm working with Excel from within Access using automation. I'm running a comparison between two tables, and checking for differences. The results will be displayed in an Excel sheet.

I know that when you're working with Excel, you should kill all instances of it (objXL.Quit, etc.) However, if certain criteria are met, I want to display the newly-created workbook on the screen....users could use the "Save As" option and do with it what they like - I have no interest in it after that. If I do that, would I still need to kill Excel, or would their closing the program handle that? Here's a skeleton of the code. objXL and objWB have module-level scope.

' Assume no differences
blnDifferences = False

' Create a handle to Excel
Set objXL = CreateObject("Excel.Application")

' We'll start a workbook with 0 sheets - we'll add sheets as needed
objXL.SheetsInNewWorkbook = 0
Set objWB = objXL.Workbooks.Add
objXL.SheetsInNewWorkbook = 3

' SUBS GO HERE - TO RUN CHECKS

If blnDifferences Then

objXL.Visible = True
' ?? Anything else here?

Else

MsgBox "No differences have been found.", vbInformation, "Check OK"

objWB.Close
Set objWB = Nothing

objXL.Quit
Set objXL = Nothing

End If
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Hanging Instances Of EXCEL.EXE?

Their closing of the Excel Workbook will do that.



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Excel hanging... Jambo Excel Discussion (Misc queries) 1 May 30th 08 03:13 PM
Problem with Excel 2007 Hanging when I open a worksheet kerrso05 Excel Discussion (Misc queries) 2 April 5th 08 08:42 PM
autorecovery save is hanging up excel for minutes Victor Excel Discussion (Misc queries) 5 August 1st 07 12:12 AM
Can you use a hanging indent in an Excel cell? DBTI Excel Discussion (Misc queries) 1 July 8th 05 09:08 PM
Can you use hanging indents in Excel? TPA59 Excel Discussion (Misc queries) 1 June 2nd 05 09:42 PM


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