K
Keith Lorenzen
I have this code which attempts to return parts of a
string, separated by a period:
For Each c In Range(RefEdit1.Value).Cells
c.Value = Str(Mid(c.Value, 5, 5) & "." & Mid(c.Value,
1, 2))
When I take out the & ".", I get what I expect (the fifth
through ninth character of the string, followed by the
first two characters of the same string). But when I have
the & "." in the code (my intention is to have a dot
(period) between the two sections of text), I get only the
first Mid function returned (characters five through
nine). Can anyone help me with why this is happening? I
thought that by enclosing my period in double quotes that
the program would undersand it to mean text, but
apparently it's considering it something else.
Thanks,
Keith Lorenzen
(e-mail address removed)
string, separated by a period:
For Each c In Range(RefEdit1.Value).Cells
c.Value = Str(Mid(c.Value, 5, 5) & "." & Mid(c.Value,
1, 2))
When I take out the & ".", I get what I expect (the fifth
through ninth character of the string, followed by the
first two characters of the same string). But when I have
the & "." in the code (my intention is to have a dot
(period) between the two sections of text), I get only the
first Mid function returned (characters five through
nine). Can anyone help me with why this is happening? I
thought that by enclosing my period in double quotes that
the program would undersand it to mean text, but
apparently it's considering it something else.
Thanks,
Keith Lorenzen
(e-mail address removed)