PC Review


Reply
Thread Tools Rate Thread

Conver text to number in VBA

 
 
MSN
Guest
Posts: n/a
 
      2nd Nov 2003
Hi,

How to convert "1995" (text) to 1995 (number) in VBA?

Thanks.
Sam


 
Reply With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      2nd Nov 2003
activecell.Numberformat = "General"
activecell.value = activecell.value


or if it is a variable

Dim sStr as String
Dim vVal as Variant
Dim dblVal as Double
sStr = "1995"
vVal = cdbl(sStr)
'or
dblVal = sStr
--
Regards,
Tom Ogilvy

MSN <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Hi,
>
> How to convert "1995" (text) to 1995 (number) in VBA?
>
> Thanks.
> Sam
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
conver text to number =?Utf-8?B?c2llcnJhbGlnaHRmb290?= Microsoft Access Queries 5 19th Apr 2007 12:32 PM
Conver string into number during join Eric Microsoft Access 3 7th Sep 2006 08:32 PM
Conver General number to Currency ellenricca@gmail.com Microsoft Excel Discussion 2 4th May 2006 07:33 PM
can '1' be conver to true ,and the '0' conver to false ? Kylin Microsoft ASP .NET 2 2nd Jun 2005 04:08 PM
I need to conver number (dollars) into text so I can inser... =?Utf-8?B?T2Zlcg==?= Microsoft Access Macros 4 25th Mar 2005 03:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:44 PM.