#31
|
||||
|
||||
Try the attached. For your template, you will require all of the included code instead of what you now have for your 'TabbedCensus1790To1940Macro' and 'LockDD1' macros. I've also commented-out the .ExitMacro = "UnlinkFields" line in the code for testing purposes (plus that macro isn't in the code I'm returning). As you will see, a complete re-write of your code was required. The code should now give you a good idea of how to use macros for conditional text & formfield insertion at nominated bookmarks. Note, too, that I've eliminated all of your IF fields. Given the need to conditionally insert multiple formfields, it didn't make sense having some of the processing done that way and the balance via macro coding when the latter handles the lot quite seamlessly.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#32
|
|||
|
|||
Whoa! there's a lot to digest here! I would ask you to explain the why and how but that would take too long. Your help is much appreciated- Thanks-
|
#33
|
|||
|
|||
Couple of things:
1) I need to take out the 1890 as there is no census for that decade. 2) When I create a toolbar for this doc both of the macros do not show up in the commands section. Why is that? Thanks- |
#34
|
||||
|
||||
Quote:
.Add Name:=i to: If i <> 1890 Then .Add Name:=i Are you adding the macros to your template and creating the 'toolbar' in that? Note, too, that the document I returned references Word's Normal template, not the template attached to post #30.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#35
|
|||
|
|||
With a few minor mods this code works perfectly-Thanks. Have you or anyone you know created a pull-down menu in the Quick Access Toolbar?
|
#36
|
||||
|
||||
AFAIK that's not possible. Some items can be added via VBA, but not a dropdown.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple If statements, | Jamal NUMAN | Excel | 16 | 11-15-2022 11:59 PM |
Countif statements | Alaska1 | Excel | 5 | 02-05-2015 07:55 PM |
Using IF statements | stuwoolf | Excel | 2 | 01-10-2015 01:58 PM |
count if statements | Alaska1 | Excel | 1 | 05-14-2014 08:21 AM |
IF statements that shifts to right. | kent | Excel | 0 | 01-19-2006 02:23 PM |