LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MsgBox in new instance of Excel?


Greetings all.

I have an Excel add-in that opens a template in a new instance o
Excel, distinct from the worksheet from which the add-in runs. How ca
I get a message box to appear in the new instance instead of th
original one? I'm completely stymied here.

Here is the code that launches the template:



code:
--------------------------------------------------------------------------------
Public Sub OpenExcelTemplate()

'Create Excel Objects to display reports

On Error GoTo Error_Handler

gsTemplateFile = Environ("USERPROFILE") & "\Applicatio
Data\Microsoft\Templates\" & gsTemplateFile

'Open Excel file
Set objXL = GetObject("", "Excel.Application")
Set objWorkBooks = objXL.Workbooks
Set objWorkBook = objXL.Workbooks.Open(gsTemplateFile)
Set objWorkSheets = objWorkBook.Worksheets

With objXL
.Cursor = xlWait
.StatusBar = "Generating Reports. Please be patient..."
End With

Exit Sub
Error_Handler:
LogFile.WriteLine CStr(Now()) & ": Could not open Excel Template
Error: " & Err.Number & " " & Err.Description
Err.Clear

End Sub
-------------------------------------------------------------------------------

--
JeffK62
-----------------------------------------------------------------------
JeffK627's Profile: http://www.excelforum.com/member.php...fo&userid=2692
View this thread: http://www.excelforum.com/showthread.php?threadid=40148

 
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 - New Instance JMay Excel Discussion (Misc queries) 4 November 28th 09 04:55 PM
MsgBox - How to display In Other Instance of Excel Alan Excel Programming 8 August 19th 04 10:49 PM
Lock down a new instance of Excel App quartz Excel Programming 0 April 22nd 04 06:26 PM
Excel Instance FuzzyLogic Excel Programming 2 February 21st 04 03:41 PM
Second instance of Excel Dom[_2_] Excel Programming 1 August 25th 03 05:37 PM


All times are GMT +1. The time now is 01:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"