#1
|
|||
|
|||
VBA Script to run macros based on the dropdown value
Hi
Im trying to run different macros based on individual value in a dropdown field So basically if the value of the dropdown is accounting then the some check box should be checked This is the code im using not sure what the error is Private Sub Dropdown3() With ActiveDocument If .FormFields("Dropbox3").Result = "Accounting" Then .FormFields("Check1").CheckBox.Value = True .FormFields("Check2").CheckBox.Value = True .FormFields("Check3").CheckBox.Value = True .FormFields("Check6").CheckBox.Value = True .FormFields("Check7").CheckBox.Value = True .FormFields("Check8").CheckBox.Value = True .FormFields("Check9").CheckBox.Value = True .FormFields("Check11").CheckBox.Value = True |
#2
|
||||
|
||||
Aside from the fact your posted code is missing the closing:
End If End With End Sub statements, which I assume it has, your code looks OK. What is the error message and what code line, if any, if highlighted at that time? PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with VBA script | nsyrax | Word VBA | 1 | 01-18-2014 03:38 AM |
Outlook Script Help | TheInfinetGroup | Outlook | 1 | 03-02-2013 07:43 AM |
Add Shared Calendar using script | Antros | Outlook | 0 | 03-15-2012 01:01 PM |
Macro to populate a text form field based on dropdown selection | koloa | Word | 0 | 10-20-2011 11:52 AM |
[ask] about VB Script + Ms. Project | anak_baru | Project | 2 | 03-10-2009 01:42 AM |