Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


Excell Function not defined ?

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA
View previous topic :: View next topic  
Author Message
ddanmcgrew



Joined: 14 Nov 2008
Posts: 7
Location: Seattle

PostPosted: Fri Nov 14, 2008 4:29 pm    Post subject: Excell Function not defined ? Reply with quote

I am writing a macro Confused
users enters numbers in cells on "Input" workshhet.
macro grabs numbers performs math functions on them.
and loops thru approx 20 input cells
everytime this function is run some of those input cells will be empty
When it grabs an empty cell you get a division by zero error
So I need it to end the loop when it encounters the first empty cell.
Code goes like this

Do Until a >= 31
If IsNumber(worksheets("Input").Cells(a,b) = False Then
Exit Do
End If

The problem is I get an Error that "Sub, Function, or Property not defined (Error 35)"
It highlights the name of the Sub
Sub PressureTable()
and the built in excell function
IsNumber
This is a built in excell function and it automatically capatilized the I and the N in IsNumber when i typed it into the code
Why can't I use it ? Question
Back to top
View user's profile Send private message
mohan.ankur
Moderator
Moderator


Joined: 02 Aug 2006
Posts: 52

PostPosted: Mon Nov 17, 2008 2:47 pm    Post subject: Here is the answer Reply with quote

Try

Worksheetfunction.IsNumber

All the excel functions which are available in VBA are used with WorkSheetfunction. and the function...

Hope this helps
_________________
http://www.exceldepot.com
http://www.xlmacros.com
http://www.learnexcel.org
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
ddanmcgrew



Joined: 14 Nov 2008
Posts: 7
Location: Seattle

PostPosted: Thu Nov 20, 2008 4:33 pm    Post subject: Reply with quote

Thanks a lot.
I am new to coding, but this is huge for me
Thanks a lot
New Structural Engineer
Dan C.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group