![]() |
|
#1
|
|||
|
|||
![]()
I have a Word VBA program with the following code ...
Code:
Set xlApp = CreateObject("Excel.Application") Set xlWB = xlApp.Workbooks.Open(xlAppFile) xlApp.Visible = True SetTimeouts 180000, 180000 With xlWB.Worksheets(1) .Cells(mySessionNo + 1, 2).Activate While (myMOTM(0, 0) = "" Or myMOTM(1, 0) = "" Or myMOTM(2, 0) = "") myMOTM(0, 0) = .Cells(mySession + 1, 2).Value myMOTM(1, 0) = .Cells(mySession + 1, 3).Value myMOTM(2, 0) = .Cells(mySession + 1, 4).Value Wend End With xlWB.Close True xlApp.Quit Set xlWB = Nothing Set xlApp = Nothing Code:
Public Sub SetTimeouts(ByVal lngComponentBusy As Long, ByVal lngRequestPending As Long) App.OLEServerBusyTimeout = lngComponentBusy App.OLERequestPendingTimeout = lngRequestPending End Sub I assume this is the "APP.", which has come straight from the MS page I got the code from, but "xlAPP" & "xlWB" give the same result ... what am I doing wrong ?!? |
#2
|
||||
|
||||
![]()
You would need to change .App to .xlApp and have the xlApp object available to all subs in the module.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
word vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pasting image captured with a java program 'on to clipboard' into MSWord 2007 is blur | tarunkumarreddy | Word | 0 | 02-03-2012 09:42 PM |
![]() |
suzunow | Office | 1 | 12-26-2010 04:41 AM |
Office 2007: Adding a program | Steve_D | Office | 0 | 10-27-2010 03:39 AM |
Timing with Custom Animation | Hannah | PowerPoint | 0 | 03-21-2010 10:57 AM |
Slide Timing in Power Point | htown | PowerPoint | 1 | 09-14-2009 12:02 PM |