Google Answers Logo
View Question
 
Q: References of price worksheetfunction in VB ( No Answer,   0 Comments )
Question  
Subject: References of price worksheetfunction in VB
Category: Computers > Programming
Asked by: thebelgian-ga
List Price: $5.00
Posted: 11 Jan 2005 07:33 PST
Expires: 18 Jan 2005 07:20 PST
Question ID: 455528
Hi,
Which Reference must I select to be possible to use the
worksheetfunction PRICE in Visual Basic. Thanks vincent

Request for Question Clarification by maniac-ga on 11 Jan 2005 17:18 PST
Hello Vincent,

From what I can determine, you cannot directly use the Microsoft Excel
function "price" from Visual Basic. You can confirm this in the Visual
Basic editor in the following ways:
 - bring up the Microsoft Excel Visual Basic help & view the entry
titled "List of Worksheet Functions available to Visual Basic". There
are several functions starting with the letter P, but PRICE is not one
of them.
 - bring up the Object Browsers. Enter WorksheetFunction in the Search
Text field (near top, center) and enter. Select WorksheetFunction in
the window below and a list of methods are listed in the lower window.
Price again is not listed.

[of course - if your version of Excel shows otherwise, let me know and
I can explain how to call that function]

I can describe as an alternative method to enter the function into a
cell and extract the value [if that would help]. Please indicate if
you would accept an answer with that approach.

  --Maniac

Clarification of Question by thebelgian-ga on 12 Jan 2005 01:05 PST
Hello Maniac,
No this would help, there are too many cells and it would take a too
long processing time. Thanks anyway

Request for Question Clarification by maniac-ga on 12 Jan 2005 16:15 PST
Hello Vincent,

Hmm. I did a quick test and did 100 price() calls in the spreadsheet
and copied values to separate cells in about 5 seconds. The macro
is...
Sub priceit()
    For I = 1 To 100
        Cells(I, 1).Formula = _
          "=price(""2/15/1999"",""11/15/2007"",0.0575,0.065+(" _
          & I & "*0.001),100,2,0)"
        Cells(I, 2).Value = Cells(I, 1).Value
    Next I
End Sub
This example can be customized to meet a number of different needs.

Just curious, but how many cells are "too many"?

  --Maniac

Clarification of Question by thebelgian-ga on 18 Jan 2005 07:20 PST
Hello Maniac,
I found the solution. The references I clicked were 'funcres' and
'atpvbaen.xls' and the price function works in VBA.
Thanks
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy