How to pad a string with spaces

How to pad a string with spaces

Hi Everyone,

I have an application that will export records to MYOB accounting, and am trying to set up one field properly.  The field will be a concatenation of four other fields.  The entire length of the feild must be 255 characters long and have the following attributes:

strPO + varCellPadding + cboClient + cboMethod + cboLanguage

The trick is that varCellPadding is a variable: varCellPadding = 255 - (strPO + cboClient + cboMethod + cboLanguage)
Getting this value is easy, but how do I actually pad the string with the correct number of spaces?  From what I understand Deluge does not allow For/Next loops that can do this.

Any help, as always, would be greatly appreciated.


Leo Saumure