ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Form Button Closing WorkSheet (https://www.excelbanter.com/excel-programming/322123-vba-form-button-closing-worksheet.html)

Bill Brutzman

VBA Form Button Closing WorkSheet
 
Aside from the red "X" in the upper right corner, my boss wants a button on a
form that would close out of the worksheet (and the macro) altogether.

Markus Scheible[_2_]

VBA Form Button Closing WorkSheet
 
Hi Bill.

Simply insert a button and write a macro containing the
following:

sub btnclck()
workbooks("abcd.xls").close
unload me
end sub


Best

Markus



-----Original Message-----
Aside from the red "X" in the upper right corner, my boss

wants a button on a
form that would close out of the worksheet (and the

macro) altogether.
.


Bob Phillips[_6_]

VBA Form Button Closing WorkSheet
 
Don't need the unload me, there is no form to unload.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Markus Scheible" wrote in message
...
Hi Bill.

Simply insert a button and write a macro containing the
following:

sub btnclck()
workbooks("abcd.xls").close
unload me
end sub


Best

Markus



-----Original Message-----
Aside from the red "X" in the upper right corner, my boss

wants a button on a
form that would close out of the worksheet (and the

macro) altogether.
.




Bill Brutzman[_2_]

VBA Form Button Closing WorkSheet
 

This helps to close the worksheet...how about closing down Excel
altogether...like another red "X" button.

"Markus Scheible" wrote:

Hi Bill.

Simply insert a button and write a macro containing the
following:

sub btnclck()
workbooks("abcd.xls").close
unload me
end sub


Best

Markus



-----Original Message-----
Aside from the red "X" in the upper right corner, my boss

wants a button on a
form that would close out of the worksheet (and the

macro) altogether.
.



Bob Phillips[_6_]

VBA Form Button Closing WorkSheet
 
application.quit

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bill Brutzman" wrote in message
...

This helps to close the worksheet...how about closing down Excel
altogether...like another red "X" button.

"Markus Scheible" wrote:

Hi Bill.

Simply insert a button and write a macro containing the
following:

sub btnclck()
workbooks("abcd.xls").close
unload me
end sub


Best

Markus



-----Original Message-----
Aside from the red "X" in the upper right corner, my boss

wants a button on a
form that would close out of the worksheet (and the

macro) altogether.
.





Tom Ogilvy

VBA Form Button Closing WorkSheet
 
Application.Quit

closes excel.

--
Regards,
Tom Ogilvy

"Bill Brutzman" wrote in message
...

This helps to close the worksheet...how about closing down Excel
altogether...like another red "X" button.

"Markus Scheible" wrote:

Hi Bill.

Simply insert a button and write a macro containing the
following:

sub btnclck()
workbooks("abcd.xls").close
unload me
end sub


Best

Markus



-----Original Message-----
Aside from the red "X" in the upper right corner, my boss

wants a button on a
form that would close out of the worksheet (and the

macro) altogether.
.






All times are GMT +1. The time now is 07:38 PM.

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