always need 32 characters

R

ringnab

I need to copy cell entries into another program that then puts a
perspective resize on the text. In order for the perspective to work
properly, the content has to be exactly 32 characters in length so I
need something that will figure out the current number of characters in
the cell but then add the appropriate number of blank spaces.
Thanks in advance.
John
 
G

Guest

Private Sub DoPadTo32()
Dim sResult As String * 32
Dim cellCurr As Range
Set cellCurr = ActiveCell
cellCurr.Select
LSet sResult = cellCurr.Value

'Documentation From Excel VBA HELP follows
'LSet stringvar = string
'LSet varname1 = varname2
'The LSet statement syntax has these parts:
'Part Description
'stringvar Required. Name of string variable.
'tring Required. String expression to be left-aligned within stringvar.
'varname1 Required. Variable name of the user-defined type being copied
to.
'varname2 Required. Variable name of the user-defined type being copied
from.
End Sub
 

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