![]() |
NaN Validation?
What's the best way to validate that something is not a number (or is a
number, for that matter) in excel VBA? I need to handle an input box with this validation. |
NaN Validation?
forgot to mention - I used to do Javascript, and if you know Javascript, its
easy to do because there is the NaN function. But how to do it in excel VBA? |
NaN Validation?
You can use the IsNumeric function to return True or False
indicating whether a character string is numeric. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "MrPixie" wrote in message ... What's the best way to validate that something is not a number (or is a number, for that matter) in excel VBA? I need to handle an input box with this validation. |
NaN Validation?
MrPixie
Example numbrows = InputBox("How many rows to insert") If numbrows = "" Or Not IsNumeric(numbrows) Then 'do something Gord Dibben Excel MVP On Tue, 18 May 2004 18:14:20 +0100, "MrPixie" wrote: What's the best way to validate that something is not a number (or is a number, for that matter) in excel VBA? I need to handle an input box with this validation. |
All times are GMT +1. The time now is 10:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com