Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As Macro only if Check Boxes...
I have a command button that I would like to be able to use as a Save
As button. However on my form I have Check Box 12, 13, 14 that all MUST be checked in order for the Macro to funtion and allow somebody to Save. I would also really like to have a Comment window pop up explaining why the command button is not working if they have not checked off all 3 boxes. Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As Macro only if Check Boxes...
I put 4 checkboxes from the control toolbox toolbar on a worksheet.
I put a commandbutton from that same toolbar on the same worksheet. This was the code under the commandbutton: Option Explicit Private Sub CommandButton1_Click() If Me.CheckBox1.Value = True _ And Me.CheckBox2.Value = True _ And Me.CheckBox3.Value = True _ And Me.CheckBox4.Value = True Then 'ok to save Me.Parent.Save Else MsgBox "Please check all those boxes!" & vbLf & "Workbook not saved!" End If End Sub You'll have to change the names (checkbox1 becomes checkbox14, etc). JoePro82 wrote: I have a command button that I would like to be able to use as a Save As button. However on my form I have Check Box 12, 13, 14 that all MUST be checked in order for the Macro to funtion and allow somebody to Save. I would also really like to have a Comment window pop up explaining why the command button is not working if they have not checked off all 3 boxes. Thanks in advance. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clearing All check boxes using Macro | Excel Discussion (Misc queries) | |||
Can one macro serve several check boxes? | Charts and Charting in Excel | |||
Clearing Check Boxes & Running a diff Macro when unchecking the ch | Excel Discussion (Misc queries) | |||
locking check boxes using a macro | Excel Programming | |||
inserting check boxes from a macro | Excel Programming |