LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Custom functions using arguments with same name

what happens if i want to use something called RetailPrice as an argument in
another function.

"Tom Ogilvy" wrote:

Public Function RetailPrice(arg1)
Dim Cost as Double
end Function

Public function ProfitMargin(arg1)
Dim Cost as Double
End Function

the value of cost in either function is unrelated to the value of cost in
the other function. The same for Arg1

--
Regards,
Tom Ogilvy


"Spencer Hutton" wrote in message
...
I have written some functions in VBA to calculate profit margin, cost and
suggested retail price. they are simple in that the RETAILPRICE function

has
two arguments, COST and MARGIN. i am also using an argument named COST in
the PROFITMARGIN function. how can i get VBA to recognize these as

seperate
variables? do i have to put them in separate modules? or is there a

certain
way i need to declare the variables? thank you.




 
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
Errors on Functions with many arguments Ravi Excel Worksheet Functions 1 January 11th 07 03:27 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Need know what are valid SUMPRODUCTS arguments and functions sparham Excel Worksheet Functions 2 October 30th 05 09:32 AM
Arguments of Excel functions soonh Excel Programming 2 November 2nd 04 08:07 PM
Arrays as Arguments in Functions Dean[_6_] Excel Programming 3 June 24th 04 12:28 PM


All times are GMT +1. The time now is 08:24 PM.

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"