Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2020, 10:26 AM
Jennifer Murphy's Avatar
Jennifer Murphy Jennifer Murphy is offline Macro to highlight alternating sections of a table Windows XP Macro to highlight alternating sections of a table Office 2007
Competent Performer
Macro to highlight alternating sections of a table
 
Join Date: Aug 2011
Location: Silicon Valley
Posts: 234
Jennifer Murphy is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
The code I supplied in post #21.

That code was based on your original specification:

and requires each parameter to be preceded by '=' and, except for the last, to be followed by ','. The order in which they occur is critical - regardless of whether you supply the keywords (which aren't actually necessary for the parsing). For example, the code cannot possibly know which is the column and the row if you use:
3, 1, 215, 199, 244
or:


1, 3, 215, 199, 244
unless you stick to a specified order. Yes, you could just pass a string of numbers separated by whatever character you choose (e.g. just a space or a comma) but, even so, the order would remain critical.

It seems you're using something different from what we've discussed. It's a bit hard to develop code if you're shifting the goal posts like that.
Perhaps I was not as clear as I could have been. Sorry about that. Written discussions are fraught.

Once you showed me how to have a parameter string in the document, it was always my intention to have keyword parameters that could be coded in any order and for all of them to have default values in case no parameters at all are passed.

The general syntax is something like this:

Code:
TblHiLite: [Column=C|1] [Headers=H|1] [RGB1=R,G,B|255,255,255]
           [RGB2=R,G,B|219,229,241] [MatchCase=Yes/No|Yes]
My code handles that by breaking the entire string into tokens delimited by spaces. It then breaks each token into a keyword and value delimited by "=". If the keyword matches one of the defined ones, the value is used.

The order doesn't matter and none of them are required. This is a very flexible syntax and easy for the user (me) to use.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to highlight alternating sections of a table Macro to highlight a list of words bakerkr Word VBA 4 10-19-2017 02:23 PM
Macro to highlight alternating sections of a table Word 2010 VBA Print Macro - Specified Sections Benbon Word VBA 3 03-30-2017 02:31 PM
Macro to highlight alternating sections of a table Macro Question: Need help making a macro to highlight the first word in every sentence LadyAna Word 1 12-06-2014 10:39 PM
Macro to highlight alternating sections of a table Macro to highlight words bertietheblue Word VBA 9 07-01-2013 12:39 PM
find - reading highlight - highlight all / highlight doesn't stick when saved bobk544 Word 3 04-15-2009 03:31 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:38 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft