button-state in Excel Save-As-Dialog

daniel_green

New Member
Hey everybody!

I HAVE A BIG PROBLEM!

I want to save a Excel-File and therefor I use the command
chWorksheet:SaveAs("myExcel1.xlc").
and it works fine. :)

But if the file already exists, a new dialog will pop-up and describes that the file already exists and that I should press one button (yes,no,cancel).

AND HERE IS MY PROBLEM: :mad:
I want to know which button was pressed.

I've tried this command:
def var butState as char init ?.
butState = chWorksheet:SaveAs("MyExcel1.xlc").

if button "YES" was pressed then butState = 1.
if button "NO" or "CANCEL" was pressed then butState = ?.

So my question is: is there any solution so that I can distinguish between NO and CANCEL????? :confused:


Thanks for your circumstances
Daniel
 
Top