Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Variable Type - help me to solve this

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Variable Type - help me to solve this

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.

"choco140" skrev i en meddelelse
om...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Type mismatch" when I try to fill an Array variable with "+" [email protected] Excel Discussion (Misc queries) 1 April 17th 07 01:28 PM
Excel will not let me type any characters....I can type in Word. deholly Excel Discussion (Misc queries) 1 March 17th 06 10:34 AM
Adding new 'Type' to Format->Number->Time->Type Chip Pearson Excel Discussion (Misc queries) 5 September 26th 05 08:45 PM
solver can not solve polynomial eq. where one variable is five di. Amitava Excel Worksheet Functions 4 November 3rd 04 12:34 PM
User Defined Type Structure - want it to be variable not numeric literal WyoCracker Excel Programming 1 July 21st 03 09:28 PM


All times are GMT +1. The time now is 09:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"