Variable Type - help me to solve this

  • Thread starter Thread starter choco140
  • Start date Start date
C

choco140

A1 content is '02/9085 but when I run the under mentioned program I
always get 01/02/9085 (feb-85), can anybody pls help me to keep the
data the way they are.

Sub Test()
Dim a As String
a = Range("A1").Value
Range("A1").Value = a
End Sub
 
One way:

Sub Test()
Dim a As String
a = Range("A1").Value
Range("A1").Value = "'" & a
End Sub

"'" : single quote between 2 doouble quotes.

--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.
 
Back
Top