help with a userform within word.

dusty

Registered User.
Local time
Yesterday, 20:40
Joined
Aug 20, 2009
Messages
42
So basically I have a word document set up which on load display several message boxes one after the other depending on the answer YES or NO a bookmark is found within the document and deleted.

The purpose being the document is trimmed down and tailored for teh specific requirements.

However I would prefer to have the questions all visible at the same time on a userform.

I have no problem loading the userform on open or hidding it again.

But I want to use checkboxes and I can't seem to get them to work the way I want.

I want 8 checkboxes corresponding to 8 questions the user can tick the appropriate answers but I don't want the code to read these answers until the user hits a command button called update.

I then want the program to read the combination of yes no delete the required bookmarks and then update the TOC

The problem I am having is reading and acting on the values of teh checkbox's maybe im doing something silly.

my other program works great with the msgbox's but the userform will be more user friendly I hope.

I can give examples of the code I already have working if it will aid responses.

Cheers Dusty
 
Dusty,

Basically you can create your user form and place the desired check boxes on that form along with a couple of command buttons, one, "Cancel" to allow the user to cancel (if this is acceptable) and the other "Ok" to perform the actions based on user selections in your form. It is in the OnClick event of the Ok button where you want to place code that will check the value of each of your check boxes and take the appropriate action based on the value of the check box. Each check box has a name (you can rename as desired) in your code you will simpley refer to each check box, checking its current value and if it is checked (true) then you have your code to perform the desired action.

I know this is a general answer, but hopefully it will get you started in the right direction.
 
Thanks Mr B that was teh general direction I was heading in.

I have one more probolem regarding this form. Different than above.

The form is working perfectly loads on open executes required procedures and hides when confirm button is selected.

How do I make this form use once? The document is read only the user uses the form to manipulate the document and once confirmed I want the form to be unusable again. So that when the document is saved obviously as a different file(original read only) on opening the saved document the userform does not show.

what code will achieve this

at the moment I use userform.show

userform.hide

is there a userform.delete? that could be activated on save?

or a way of deleting all macros on save?

cheers dusty
 

Users who are viewing this thread

Back
Top Bottom