Public ohneabbrechen As Boolean
Sub registrieren(control As IRibbonControl)
ohneabbrechen = True
Application.Quit
AppActivate ThisWorkbook.Windows(1).Caption
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim ReturnValue As Integer
If ohneabbrechen = True Then
'ReturnValue = MsgBox(“Close Program?”, vbYesNo + vbQuestion, “Program”)
ReturnValue = MsgBox(“register in new window.” & _
vbCrLf & “” & _
vbCrLf & “Save?”, vbYesNo + vbQuestion, “Program”)
Select Case ReturnValue
Case vbYes
exportieren
Case vbNo
End Select
ThisWorkbook.Saved = True
Dim RetVal
RetVal = Shell(PathToFile(“Program.exe -enterkey”), 1)
Else
ReturnValue = MsgBox(“Save?”, vbYesNoCancel + vbQuestion, “Program”)
Select Case ReturnValue
Case vbYes
Call exportieren
Case vbCancel
Cancel = True
Case vbNo
End Select
ThisWorkbook.Saved = True
End If
End Sub
Which error this time?TankPro said:I tried to compile my workbook on the other computer, but I’ve got another error message when clicking the ribbon menu in my EXE file.
Which message box because your code shows several ones?Frankschn said:the message box appears twice. this works in the normal Excel file.
doesnt work anymore.RetVal = Shell(PathToFile(“customui.exe -enterkey”), 1)
We use essential cookies to make this site work, and optional cookies to enhance your experience.