Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 07-21-2017, 08:11 AM
slaycock slaycock is offline A wish for enumerated strings Windows 7 64bit A wish for enumerated strings Office 2013
Expert
A wish for enumerated strings
 
Join Date: Sep 2013
Posts: 255
slaycock is on a distinguished road
Default

The array approach was one of my first solutions (except I was using split with a single string). But to make the code more meaningful I also defined an enumeration to index the array.

This allowed me to say things like

docXMLProp(<propertyname>)

Which still leaves what should be a constant writable. So I made the array behave like a constant by putting it in a class. That leaves me with the choice of one get statement per enumeration value

docXMLProp.<propertyname>

or a single get property with a case statement to allow the form

docXMLProp.item(<propertyname>) or
docXMLProp(<propertyname>)

if you go through the rigamarole of exposting the class, setting the default property as item then reimporting.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
A wish for enumerated strings How to Dim a substring between two strings dwirony Word VBA 4 10-28-2016 07:51 AM
VBA code to extract strings twozedz Excel Programming 1 05-15-2016 06:00 AM
A wish for enumerated strings Search with multiple strings silverspr Excel 7 03-03-2013 04:45 PM
A wish for enumerated strings Removing Character Strings digitalhecht Word 2 10-17-2011 12:53 PM
A wish for enumerated strings update style of all strings available between two specific strings vikrantkale Word 1 03-28-2011 06:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:05 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