How can I branch from to

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.
 
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.

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

isabelle

hi,


if you run the command
ThisWorkbook.Close
Workbook_BeforeClose event will automatically execute
 
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.

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
 
B

Bobby

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top