PDA

View Full Version : Option button on opening document linked to macros



sarahLyons
07-31-2018, 06:40 AM
Hi, I would like to create a pop up or userform on opening a word template which gives the user an A and B option linked to macros optionA and optionB below - and then a subsequent pop up which allows the user to select language: Spanish, Portuguese, Russian (all linked to macros), English (does nothing)

I have a word template which has two configurations of subheadings (optionA and optionB) and which is in multiple languages.

I have bookedmarked the heading and created macros for the two configurations (optionA and optionB). I have also saved all the subheadings as autotext within each language group (created macros to update subheadings and change defaul language - Spanish, Portuguese and Russian).

Is this possible? I could do just have buttons in word document but I'm hoping to make this as straight forward for the user as possible.

Thanks!

gmaxey
07-31-2018, 07:51 AM
I don't know what macro you want to run, but you can call a named macro from the click event of an option button:


Private Sub OptionButton1_Click()
Application.Run "A" 'Runs a macro named Sub A()
Hide
End Sub