Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - New Instance | Excel Discussion (Misc queries) | |||
MsgBox - How to display In Other Instance of Excel | Excel Programming | |||
Lock down a new instance of Excel App | Excel Programming | |||
Excel Instance | Excel Programming | |||
Second instance of Excel | Excel Programming |