PDA

View Full Version : Solved: Is this possible to replace



softman
10-04-2010, 11:01 PM
I have the following code below:


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Response As Long
Response = MsgBox("Do you really want to quit?", vbYesNo)
If Response = vbNo Then
Cancel = True
Else: Me.Saved = True
Application.OnKey "%{F11}", ""
Application.OnKey "%{F8}", ""
End If
End Sub

When you click the exit the mesaahe box pop up but the heading show "Microsoft Excel" .

Is it possible to change the Word "Microsoft Excel" to "Exit" or any thing else?

Many thanks

Bob Phillips
10-05-2010, 12:32 AM
I showed you this yesterday



Response = MsgBox("Do you really want to quit?", vbYesNo, "Exit")

macropod
10-05-2010, 12:33 AM
Hi softman,

This really is rather trivial, and fully documented in the vba Help file. Change:
Response = MsgBox("Do you really want to quit?", vbYesNo) to:
Response = MsgBox("Do you really want to quit?", vbYesNo, "Exit")

softman
10-05-2010, 01:40 AM
Many thanks. Apologise for the lack of knowlege, very very basic vba user.