Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Bill Howell   on Sep 20 In MS Office Category.

  
Question Answered By: Volker Fischer   on Sep 20

Thanks for your very insightful help  and yes, you guys  helped me big
time.

My first error that I have found out was this:

Function tax(status As String, income As Currency)
'some code
End Function

the "status" variable, according to sir Bob:
'Be aware that 'status' is a property used several places in VB, so
you might want to name it 'TaxStatus' instead.'

and second and significant error is that all of you guys spotted is
obviously, I never had a return  type with my code.

And, sir Dave is right, according to him:

'BTW your second parameter is currency, not double. I haven't looked
at how VBA stores currency  variables, but it's certainly not the same
as doubles - more precision and less decimal places. I don't know
whether this could be causing your problems'

You got that right sir!

Currently, my code is working and yet I got undesirable results in
terms of the output but it's ok! This is up to me now to debug  the
formulas.

Thank you all of you guys! I really really appreciate it.

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Different Parameters in Excel UDF Or get search suggestion and latest updates.


Tagged: