Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
i have a user form and when you click the "Close" button at the bottom it
closes out of the macro/userform it looks like this right now.. Private Sub cmdClose2_Click() Unload Me End Sub what can i add to this sub so that when the button is clicked it 1. saves the workbook 2. closes the worksheet/exit out of excel thanks! -- --Chip Smith-- |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Just add the following to your code: Unload Me ActiveWorkbook.Save Application.Quit -- Kevin Backmann "Chip Smith" wrote: i have a user form and when you click the "Close" button at the bottom it closes out of the macro/userform it looks like this right now.. Private Sub cmdClose2_Click() Unload Me End Sub what can i add to this sub so that when the button is clicked it 1. saves the workbook 2. closes the worksheet/exit out of excel thanks! -- --Chip Smith-- |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Chip
What happens if the user has more than your file open in Excel ? Don't do that. Best wishes Harald "Chip Smith" skrev i melding ... i have a user form and when you click the "Close" button at the bottom it closes out of the macro/userform it looks like this right now.. Private Sub cmdClose2_Click() Unload Me End Sub what can i add to this sub so that when the button is clicked it 1. saves the workbook 2. closes the worksheet/exit out of excel thanks! -- --Chip Smith-- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
close button does not close | Excel Discussion (Misc queries) | |||
automatically close hyperlink with back button | Excel Worksheet Functions | |||
2003 - Close Button Unavailable | Excel Discussion (Misc queries) | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
Use the X button on a userform | Excel Discussion (Misc queries) |