K
KR
I have an existing userform with a bunch of radiobuttons. The text for each
radiobbutton is pulled from a file, and I originally set it up so that each
radiobutton is in a fixed location with three lines of text, and that was
sufficient to hold all the text _and_ show all the items (the number of
items is flexible as well).
In my most recent source file, which I don't have any control or influence
over, some of the items were longer than my three lines, and there were a
few cases where the total number of items was greater than my maximum based
on my (fullscreen) userform size- in those cases, ususally I had several
individual items on the page that didn't take the whole three lines, so I
had wasted space above and not enough room at the bottom for all my items.
So now I want to figure out how to measure how many lines I need for each
radiobutton on the fly, and adjust the XY location of each radiobutton from
the one above to take advantage of any open space so I can fit more
radiobuttons on the page. This would also give me what I need to deal with
the items that are too long, as the next radiobutton would just be shifted
down instead of up.
So here is my question; in Word97 (and forward) is there any reliable way to
determine how many rows the text of a radiobutton will be (or already is)
based on the width of the radiobutton? If not, what is the best workaround
available?
Thanks!
Keith
radiobbutton is pulled from a file, and I originally set it up so that each
radiobutton is in a fixed location with three lines of text, and that was
sufficient to hold all the text _and_ show all the items (the number of
items is flexible as well).
In my most recent source file, which I don't have any control or influence
over, some of the items were longer than my three lines, and there were a
few cases where the total number of items was greater than my maximum based
on my (fullscreen) userform size- in those cases, ususally I had several
individual items on the page that didn't take the whole three lines, so I
had wasted space above and not enough room at the bottom for all my items.
So now I want to figure out how to measure how many lines I need for each
radiobutton on the fly, and adjust the XY location of each radiobutton from
the one above to take advantage of any open space so I can fit more
radiobuttons on the page. This would also give me what I need to deal with
the items that are too long, as the next radiobutton would just be shifted
down instead of up.
So here is my question; in Word97 (and forward) is there any reliable way to
determine how many rows the text of a radiobutton will be (or already is)
based on the width of the radiobutton? If not, what is the best workaround
available?
Thanks!
Keith