VBA Form Button Closing WorkSheet

B

Bill Brutzman

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

Markus Scheible

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
 
B

Bob Phillips

Don't need the unload me, there is no form to unload.

--

HTH

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

Bill Brutzman

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

Bob Phillips

application.quit

--

HTH

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

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