![]() |
|
#10
|
||||
|
||||
|
Your code doesn't make much sense to me.
There's an obvious error with 'End Sub' appearing before 'Option Explicit'. Then you have a Document_Open macro that selects the 'ColourDropDown' bookmark and then calls an 'Index' macro that tries to populate a variable 'i' with whatever appears in the corresponding formfield's internal bookmark after 'ColourDropDown'. A coding error there means the code falls over that that point. If it worked, 'i' would always be 0, since the formfield's name is the same as the 'ColourDropDown' bookmark itself. So what is the point of the 'i' variable? If the above worked, you would then have your formfield call the 'ColorDropDown' macro, whose code looks for a formfield named '"DropDown" & i' which, if anything, would always evaluate to 'DropDown0'. But no such formfield exists - the dropdown formfield's name is only ever 'ColourDropDown' and no other formfield with a name like '"DropDown" & i' exists in the document. Finally, even if you resolve all of the above, your code would set the Dropdown selection's font and background to the same colour, effectively making the text invisible.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drop Downs | Suray1911 | Excel | 1 | 09-29-2015 10:31 PM |
Excel 2013 Project Timeline - colour coding data labels
|
MicrosoftNovice2015 | Excel | 1 | 09-15-2015 02:16 PM |
field shading for drop downs
|
rbd50 | Mail Merge | 3 | 03-31-2015 09:52 PM |
Drop-Downs: Run Macro on Exit
|
Andrew H | Word VBA | 15 | 11-16-2012 08:34 AM |
Please help me with drop downs in Excel 2010
|
mhays | Excel | 6 | 01-16-2012 09:29 AM |