LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Need help developing a Excel VBA Macro to Vaildate data enteredinto a textbox

I dont understand

1234 is a number in my world why would 'isnumeric' return it as false?

More to the point when I use 'isnumber(textbox2.text)' it giving me a
compile error:Sub or Function not defined
isnumeric isn't

another error im getting is, if you delete the data thats written to
the sheet by the form it won't let you add anymore data (even if you
close and restart excel)

Run-time error '1004':
Application-defined or object-defined error

And the Debugger highlights my line of code that should write the
textbox value into the Sheet

Cells(y, CLng(Right(tb.Name, 1))) = tb

think its getting lost as to what row to add the datainto after the
deletion


On Nov 26, 6:59*pm, Gord Dibben <gorddibbATshawDOTca wrote:
Or maybe as Dave Peterson points out

application.isnumber(cell.value)

Which is much more stringent than VBA's
isnumeric(cell.value)

The text string '1234 will return False with excel's =isnumber() worksheet
function.

Gord Dibben *MS Excel MVP

On Thu, 26 Nov 2009 09:37:52 -0800 (PST), macro rewind

wrote:
Ah should have been Isnumeric


On Nov 26, 5:16*pm, macro rewind wrote:
Tried this but its giving me an error when I run the command button on
the form.


compile error:


Sub or Function not defined


The Debugger than highlights "IsNumber" in grey and Function Check2
with Yellow


Function check2() As Boolean
'check textbox2 has a 9 digit number
If IsNumber


 
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
Using a Macro in Excel 2004 to move entered data from one sheet toanother and space between rows when next data is entered? [email protected] Excel Programming 1 June 4th 08 05:08 PM
Developing a macro that will help with mass address cleansing Jordan Excel Programming 1 March 7th 08 02:24 AM
interaction with excel and ms SQL (retrieval of records from sql intoa sheet) [email protected] Excel Programming 2 March 5th 08 12:24 PM
Request for Help in Developing a Macro for a Billing Application Steve Excel Programming 10 February 28th 08 10:06 PM
macro that takes data entered in a user form textbox to go to a ra BrianMo Excel Programming 5 September 22nd 06 03:52 PM


All times are GMT +1. The time now is 06:53 AM.

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

About Us

"It's about Microsoft Excel"