ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I branch from to (https://www.excelbanter.com/excel-programming/447622-how-can-i-branch.html)

Bobby[_4_]

How can I branch from to
 
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.

Bobby[_4_]

How can I branch from to
 
On Saturday, November 10, 2012 7:46:26 AM UTC-5, Bobby wrote:
Private Sub CommandButton1_Click()



From here...



End Sub


Sorry I found my answer.

Thisworkbook.close


TO



Private Sub Workbook_BeforeClose(Cancel As Boolean)



code here...



Application.Quit



End Sub



Thank's Ahead.



isabelle

How can I branch from to
 
hi


Private Sub CommandButton1_Click()
ThisWorkbook.Close
End Sub

--
isabelle


Le 2012-11-10 07:46, Bobby a écrit :
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.



Bobby[_4_]

How can I branch from to
 
On Saturday, November 10, 2012 7:46:26 AM UTC-5, Bobby wrote:
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

isabelle

How can I branch from to
 
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, could you be more explicit as per the how to branch I.E:
goto Workbook_BeforeClose for example



Bobby[_4_]

How can I branch from to
 
On Saturday, November 10, 2012 7:46:26 AM UTC-5, Bobby wrote:
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


Bobby[_4_]

How can I branch from to
 
On Saturday, November 10, 2012 3:09:55 PM UTC-5, isabelle wrote:
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, could you be more explicit as per the how to branch I.E:


goto Workbook_BeforeClose for example


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


All times are GMT +1. The time now is 02:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com