same length of string

User avatar
sal21
PlatinumLounger
Posts: 4353
Joined: 26 Apr 2010, 17:36

same length of string

Post by sal21 »

i have a string:

SINGOLA
DOPPIA
TRIPLA
SUITE
SUPER SUITE

the max lenght of string is SUPER SUITE (11)

how to fill with space, the rest of string, in new var

exmple:
SINGOLA have a lenght 7, i need to fill SINGOLA and 4 space.

In effect i need a tabular list

User avatar
HansV
Administrator
Posts: 78415
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: same lenght of string

Post by HansV »

Let's say you have a variable myvar.

myvar = Left(myvar & Space(11), 11)
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4353
Joined: 26 Apr 2010, 17:36

Re: same lenght of string

Post by sal21 »

HansV wrote:
19 Jul 2021, 08:49
Let's say you have a variable myvar.

myvar = Left(myvar & Space(11), 11)
hummmm....
i have use:

TIPO = Left(RS!TIPO & Space(11), 11)
INDICE = RS!IDTIP & "-" & TIPO & "-DAL: " & RS!DAL & "-AL: " & RS!AL

but in treeview i dont see a tabular item....
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78415
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: same length of string

Post by HansV »

You will have to specify a fixed-width font for the TreeView control, for example Consolas or Courier New.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4353
Joined: 26 Apr 2010, 17:36

Re: same length of string

Post by sal21 »

HansV wrote:
19 Jul 2021, 12:06
You will have to specify a fixed-width font for the TreeView control, for example Consolas or Courier New.
:clapping: :clapping: :clapping:

i select Consols!

note:
i know only Courier New as formatted text, Consolas is new for me, and i like it!