Lachy
05-23-2003, 06:33 PM
I need to limit the length of a string in my program.
Dim Calculator(1 To 14, 1 To 150, 1 To 3) As String
That is the current declaration for an array my program uses, which (apparently) takes a lot of memory; people are getting 'Runtime Error 7 Out of Memory' when they start.
Dim Calculator(1 To 14, 1 To 150, 1 To 3) As String * 64
I tried that (to limit the length of each string to 64 characters), but I am getting all these annoying spaces at the end (which cause bugs in my program), and I can't get them to go away. I have tried Trim ect.
How can I fix this? Or is there a better way to limit the length of a string?
Dim Calculator(1 To 14, 1 To 150, 1 To 3) As String
That is the current declaration for an array my program uses, which (apparently) takes a lot of memory; people are getting 'Runtime Error 7 Out of Memory' when they start.
Dim Calculator(1 To 14, 1 To 150, 1 To 3) As String * 64
I tried that (to limit the length of each string to 64 characters), but I am getting all these annoying spaces at the end (which cause bugs in my program), and I can't get them to go away. I have tried Trim ect.
How can I fix this? Or is there a better way to limit the length of a string?