27 char string long adding space after

irade92

Registered User.
Local time
Today, 20:24
Joined
Dec 26, 2010
Messages
229
Hi
I need to use Format functon in VBA code...So this is my problem. I have a string with variable length...I need to get a string which is 27 char long adding space after ..ie "rade ivanoski ", "peter white " and so on
I tried to use this Format(name,space(27)) but it doesn't work. The string is a part of a text file that I create.
Please help
Thanks
 
Last edited:
What are you trying to do in plain English? Once we understand What you are wanting to do, someone may have options for HOW you could do it.
 
Is this what you are looking for?

Code:
Immediate window:

? ">" & Left("rade ivanoski" & Space(27), 27) & "<"
>rade ivanoski              <

? ">" & Left("rade ivanoski foooooooooooooooooooooooooooooooo" & Space(27), 27) & "<"
>rade ivanoski foooooooooooo<
 
What are you trying to do in plain English? Once we understand What you are wanting to do, someone may have options for HOW you could do it.
Well this is my plain English...From recordset I have to create a text file that is use in another application. The rule for crating this text file is described by the manual and I can send a copy of this file created with Clipper.
See attach and spaces in the line..
Thanks
 

Attachments

Is this what you are looking for?

Code:
Immediate window:

? ">" & Left("rade ivanoski" & Space(27), 27) & "<"
>rade ivanoski              <

? ">" & Left("rade ivanoski foooooooooooooooooooooooooooooooo" & Space(27), 27) & "<"
>rade ivanoski foooooooooooo<

Thanks Michael Lueck this is it...
 

Users who are viewing this thread

Back
Top Bottom