troubleshooting Question

VBA, Store Variables from a text file into an Array

Avatar of New_Alex
New_AlexFlag for Cyprus asked on
Microsoft OfficeMicrosoft ExcelVB Script
6 Comments1 Solution339 ViewsLast Modified:
[ColorGroup]
2=3
4=4
3=1
6=5
5=1
1=0
0=0

[FontGroup]
IndexFont=Times New Roman
IndexSize=34
IndexUnderline=True
IndexItalic=True
IndexBold=True
IndexCellColour=2
Box1=False


[MiscGroup]
Rapids=2
Cats=4
Docs=3
6=5
5=5
1=1
0=0

Lets say I have the above format in a settings.txt file (also attached). I am trying to find a way to read the file into a 2 dimensional Array of the Format:

MyArray(Group, Variable)

For example if I:

Msgbox MyArray("ColorGroup", "6") it will output "5".
Msgbox MyArray("FontGroup", "IndexFont") it will output "Times New Roman".

Thanks.
(Full Points will be given to the first valid answer instantly within 30minutes of post.)


settings.txt
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros