![]() |
#1
|
|||
|
|||
![]()
I have created a user form that has multiple check boxes. I want to be able to execute the check boxes selected by clicking a command button that will close the user form. Here is the code I have for the check boxes which I tested an works.
Sub CheckBox1_Click() Unload Me ChangeFileOpenDirectory _"X:\sconner\CCD Damage Mechanisms\Data Transfer Practice\" Documents.Open FileName:= _ "X:\sconner\CCD Damage Mechanisms\Data Transfer Practice\Mechanism Transfer Practice.docx" _ , ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _ PasswordDocument:="", PasswordTemplate:="", Revert:=False, _ WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _ wdOpenFormatAuto, XMLTransform:="" Selection.WholeStory Selection.Copy ActiveWindow.Close Selection.PasteAndFormat (wdFormatOriginalFormatting) End Sub |
Tags |
command button, macros, userforms |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with a Command Button | dkohnken | Word VBA | 5 | 03-18-2015 10:13 PM |
VBA Code in a UserForm module to delete a Command Button which opens the userform | Simoninparis | Word VBA | 2 | 09-21-2014 03:50 AM |
Command button to show userform suddenly stopped working | jpb103 | Word VBA | 0 | 05-22-2014 06:05 AM |
Word doc bug when closing from userform command button click macro | Joe Patrick | Word | 1 | 07-05-2011 08:53 PM |
![]() |
cksm4 | Word VBA | 7 | 02-27-2011 08:47 PM |