Conver text to number in VBA
Hi,
How to convert "1995" (text) to 1995 (number) in VBA? Thanks. Sam |
Conver text to number in VBA
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 wrote in message ... Hi, How to convert "1995" (text) to 1995 (number) in VBA? Thanks. Sam |
All times are GMT +1. The time now is 11:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com