S
Steve C
I have a combo box on a userform in which after the user selects their choice
and clicks OK, I want to separate out the first part of the selection from
the second part and distribute these parts (via bookmarks) into different
areas of the document.
For example, if the combo box choices were "9A Metal Railings" and "16B
Masonry Material," I only want "9A" or "16B" inserted into one area of the
document, while its corresponding description is placed somewhere else.
My challenge is that 9A is two characters (followed by a space) and 16B is
three characters. I'm thinking that my code should look for the first space
that occurs from the left side of the description and then store whatever is
left of that space in one variable, and whatever is to the right of that in
another variable. I could then set the bookmark text equal to the
appropriate values of those variables.
How do I write code to find the position of that first space from the left?
Thanks!
Steve C
and clicks OK, I want to separate out the first part of the selection from
the second part and distribute these parts (via bookmarks) into different
areas of the document.
For example, if the combo box choices were "9A Metal Railings" and "16B
Masonry Material," I only want "9A" or "16B" inserted into one area of the
document, while its corresponding description is placed somewhere else.
My challenge is that 9A is two characters (followed by a space) and 16B is
three characters. I'm thinking that my code should look for the first space
that occurs from the left side of the description and then store whatever is
left of that space in one variable, and whatever is to the right of that in
another variable. I could then set the bookmark text equal to the
appropriate values of those variables.
How do I write code to find the position of that first space from the left?
Thanks!
Steve C