|
-
May 24th, 2002, 03:24 PM
#1
Thread Starter
Fanatic Member
String manipulation
At some point in my app I'm adding to a listbox a string like so:
VB Code:
lstW1.AddItem Text1 & "[I]spaces go here[/I]" & Text2 & "-" & Text3
I have 16 spaces for characters so I calculate how many blank spaces I need like so:
VB Code:
iSpaces = 16 - (Len(Text1) + Len(Text2) + Len(Text3))
This leaves me with how many spaces I need to insert between Text1 and Text2, my trouble is
I can't figure out how to add these spaces.
Any help is appreciated:
"I have not failed. I've just found 10,000 ways that won't work."
'Thomas Edison'
"If we knew what it was we were doing it wouldn't be called research, would it?"
'Albert Einstein'
VB6
-
May 24th, 2002, 03:36 PM
#2
-= B u g S l a y e r =-
VB Code:
lstW1.AddItem Text1 & Space(iSpaces) & Text2 & "-" & Text3
-
May 24th, 2002, 03:37 PM
#3
Thread Starter
Fanatic Member
I got it - Thanks for reading though!
"I have not failed. I've just found 10,000 ways that won't work."
'Thomas Edison'
"If we knew what it was we were doing it wouldn't be called research, would it?"
'Albert Einstein'
VB6
-
May 24th, 2002, 03:37 PM
#4
-= B u g S l a y e r =-
your toooooo slow
-
May 24th, 2002, 03:39 PM
#5
Thread Starter
Fanatic Member
Hey - your code turned out to be better anyway!!
Thanks,
slowpoke
"I have not failed. I've just found 10,000 ways that won't work."
'Thomas Edison'
"If we knew what it was we were doing it wouldn't be called research, would it?"
'Albert Einstein'
VB6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|