Question about popup menus

Discussion created by wes_cessnun on Sep 9, 2009
Latest reply on Oct 28, 2009 by kendall_hiles

i am currently automating our DXF procedures for exporting files for mechanical team. I have every thing working except for the popup menu when a file exist.


Example of menu


"Expedition PCB" is the name of the popup.


vbQuestion, The File "C:\Temp\Test.dxf" exists. Overwrite this file?


Yes Button  No Button


This is the Piece of code that works and then not able to get rid of the Popup menu without using the mouse or pressing enter on the keyboard. I have tried to use sendkey "~" but it does not work as well



Dim dlgObj

Dim OKButton

Dim YesButton

Set dlgObj = pcbAppObj.Gui.FindDialog("DXF Export")

Set OKButton = dlgObj.FindButton("OK")

Call OKButton.Click


'code that doesn't work


pcbAppObj.Gui.ProcessCommand("Expedition PCB", True)

Set pcbYesapp = pcbAppObj.Gui.FindDialog("Expedition PCB")


Set YesButton = pcbYesapp.FindButton("Yes")




How do I get the menu to say Yes and go away. I have tried many different things but none work. It seems like my script stops after Okbutton and doen't move forward until I manually  click the yes or no button.