Hi Folkes,
I am going mad with this one. I have lost all those marbles that
everybody reckons I hadn't got in the first place!
The main purpose of my script is to activate a print property, print
and then deactivate the print property (in an external program).Code
attached below.

The following code activates print properties of an external
application. It is not excel. Both lines work seperately but put them
together and it just sets the property the last one it comes across.

My thinking was it runs the macro quicker then it can execute so I
thought putting a wait inbetween the 2 lines would solve my problem but
it doesn't. The wait works but the 2 line of code don't execute. I've
tried putting the 2nd line of code in a seperate macro that is called
but still not effect.
Can anybody point me in the right direction please of what I may try
next ?
Pleading, to put me out of my misery!
Donna

Sub Main()
Dim App As Object
Set App = CreateObject("PCDLRN.Application")
Dim Part As Object
Set Part = App.ActivePartProgram
Dim DmisCommands As Object
Set DmisCommands = Part.Commands

Part.EditWindow.ReportMode
Part.EditWindow.SetPrintOptions PCD_PRINTER,PCD_ON,PCD_AUTO,1 ' Prints
OofTols
Call Wait (10)
Part.EditWindow.SetPrintOptions PCD_OFF,PCD_OFF,PCD_APPEND,1 ' Resets
To No Printer

End Sub

Sub Wait (Seconds As Variant)
Ts =Timer
Te = Timer
Elapsed = Te-Ts
While Elapsed < Seconds
Te = Timer
Elapsed = Te-Ts
Wend
End Sub