How can I branch from to

  • Thread starter Thread starter Bobby
  • Start date Start date
B

Bobby

Private Sub CommandButton1_Click()

From here...

End Sub

TO

Private Sub Workbook_BeforeClose(Cancel As Boolean)

code here...

Application.Quit

End Sub

Thank's Ahead.
 
Private Sub CommandButton1_Click()



From here...



End Sub



TO



Private Sub Workbook_BeforeClose(Cancel As Boolean)



code here...



Application.Quit



End Sub



Thank's Ahead.

Hi Isabelle,
could you be more explicit as per the how to branch I.E:
goto Workbook_BeforeClose
for example
 
hi,


if you run the command
ThisWorkbook.Close
Workbook_BeforeClose event will automatically execute
 
Private Sub CommandButton1_Click()



From here...



End Sub



TO



Private Sub Workbook_BeforeClose(Cancel As Boolean)



code here...



Application.Quit



End Sub



Thank's Ahead.

Hi Isabelle
I did try your suggestion but unfortunately it does not branch to my

Private Sub Workbook_BeforeClose(Cancel As Boolean)

Application.DisplayAlerts = False

Application.Quit

End Sub
 
hi,





if you run the command

ThisWorkbook.Close

Workbook_BeforeClose event will automatically execute



--

isabelle





Le 2012-11-10 12:24, Bobby a �crit :

Hi Isabelle!
Thank you for your advice! Work's well.
 
Back
Top