If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Harlan,
Dim i As Long, k As Long, c As String * 1 May I ask why you DIMmed c as String *1? I always understood that doing maths on strings was meaningless as in "Sandy" * 1 Regards Sandy -- to e-mail direct replace @mailinator.com with @tiscali.co.uk |
#12
|
|||
|
|||
It is not doing math on it, but declaring it as a one byte string.
Try setting it to say 2 bytes in code and see what it contains after, c = "AB" -- HTH RP (remove nothere from the email address if mailing direct) "Sandy Mann" wrote in message ... Harlan, Dim i As Long, k As Long, c As String * 1 May I ask why you DIMmed c as String *1? I always understood that doing maths on strings was meaningless as in "Sandy" * 1 Regards Sandy -- to e-mail direct replace @mailinator.com with @tiscali.co.uk |
#13
|
|||
|
|||
I'm not Harlan, but take a look at Dim in VBA's help.
Then look at the description for "type". It contains this line "...String * length (for fixed-length strings)..." Then try something like: Dim myString As String * 1 myString = "asdfasdf" MsgBox myString Sandy Mann wrote: Harlan, Dim i As Long, k As Long, c As String * 1 May I ask why you DIMmed c as String *1? I always understood that doing maths on strings was meaningless as in "Sandy" * 1 Regards Sandy -- to e-mail direct replace @mailinator.com with @tiscali.co.uk -- Dave Peterson |
#14
|
|||
|
|||
Thank you Dave & Bob,
I did actually look in VBA Help but in my naivety I look up STRING, it never occurred to me to look up DIM (no puns please g) Regards, Sandy -- to e-mail direct replace @mailinator.com with @tiscali.co.uk "Dave Peterson" wrote in message ... I'm not Harlan, but take a look at Dim in VBA's help. Then look at the description for "type". It contains this line "...String * length (for fixed-length strings)..." Then try something like: Dim myString As String * 1 myString = "asdfasdf" MsgBox myString Sandy Mann wrote: Harlan, Dim i As Long, k As Long, c As String * 1 May I ask why you DIMmed c as String *1? I always understood that doing maths on strings was meaningless as in "Sandy" * 1 Regards Sandy -- to e-mail direct replace @mailinator.com with @tiscali.co.uk -- Dave Peterson |
|
Thread Tools | |
Display Modes | |
|
|