length of a string using inches to points help!

C

chrislooney0

Hi, I hope someone can help me.

I have a string which is made up of two separate strings. I want to
make the new string a certain length - that is, I want to make it take
up a certain amount of space. Therefore, I cannot use
do until len(activecell)=xxx, etc. because, of course, different
letters take up different amounts of space. For this reason, I cannot
use application.rept.

I have been trying to use inchestopoints, and was wondering if there
is a way I can do something like:

Do Until Application.InchesToPoints(CStr(ActiveCell)) = 7848
ActiveCell = Mid(ActiveCell, 1, TITLEN) & "." & PAGENUMB
TITLEN = TITLEN + 1
Loop

However, this does not seem to be having the desired effect. I cannot
change the font size or font name as these are dictated by a client.

Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top