Message 1 of 5
Howto: Extracting distances from text strings...

Not applicable
10-08-2004
10:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'd like to add up several dimension strings to verify the values. I need a
little help getting through this part, though. I'd like to account for
every time a dimension value has an override or is affected by the DIMRND
variable (measures 5'-2 7/16", but displays 5'-2" instead).
So what I need is a subroutine when given a string, returns a numeric value.
Example situations:
"Length varies" returns nil
"5'-3"" returns a numeric value like 63 or 5'-3"
"Prefix 5'-3"" disregards the prefix test and returns a numeric value
"5'-3" Suffix" disregards everything after encountering the first numeric
value and returns the numeric value
I'm kind of a newbie to VBA, so I would appreciate your help.
Craig