Bob Phillips
12/15/2006 4:34:00 PM
Peter,
If you want to embed spaces, it can't go into a Long variable, it will have
to be a String.
With Me.TextBox1
sVar = Format(.text,"0000 0000 0000 0000"))
End With
--
---
HTH
Bob
(change the xxxx to gmail if mailing direct)
"Peter" <peter.a.rich@googlemail.com> wrote in message
news:1166198996.149572.136690@73g2000cwn.googlegroups.com...
>I have a problem!
>
> I am writing a macro where the user pastes in a 16 digit number into a
> text box on a user form.
> This then becomes a variable (long).
>
> I need the macro to edit this variable by placing a space after the
> 4th, 8th and 12th number.
>
> ie, from this: ################ to this: #### #### #### ####.
>
> Is this possible?
>
> Thanks,
>
> Peter
>