Advertisement

10.07.2008 at 04:41AM PDT, ID: 23793318
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Using paramarray in function call

Asked by GordonCochaud in Microsoft Excel Spreadsheet Software

Tags: , ,

Greetings,,
I have a problem with coding a VBA function.   I am using Excel 2003 and have not done any serious programming for years (Pascal, though I was using Basic and Fortran on a mainframe in 1970).  This project requires reading an array of 27 cells formatted as Text (Sheet4!F3:F29) into a function so that each can be compared with another string also read in via the same function call from Excel.  The array is read in as dataIN and the single string as triad.  Because I will be using the function in a large number of different situations, the information needs to come with the call, rather than collected as the function runs.  What seems to happen is that I have not been able to convince VBA that the loop is using two arrays because it fouls up when i = 1 (Option 1 is not being used because there is not any problem using the first index value as 0 within the VBA function).  Apparently dataIN is read in as a single item because Ubound was of no help.  I am sure the solution is trivial and it is only lack of experience (= ignorance on my part which is why Help, on and off Internet, has not been).  Could someone take pity on a retired academic and spare a minute or two to fix the coding please.



Option Explicit
Function Trial2(triad As String, ParamArray dataIN() As Variant) As Integer

Dim i As Integer, dataUSED() As Variant, Sheet4 As Worksheet
Worksheets("Sheet4").Activate
dataUSED = dataIN

For i = 0 To 26
dataUSED(i) = dataIn(i)
Next i

Remainder of coding in not a problem.  An integer is returned to calling cell.


End Function

Thanks,
Gordon.
Start Free Trial
[+][-]10.07.2008 at 04:59AM PDT, ID: 22658410

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.07.2008 at 05:33AM PDT, ID: 22658642

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.07.2008 at 05:40AM PDT, ID: 22658685

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.07.2008 at 06:07AM PDT, ID: 22658946

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Excel Spreadsheet Software
Tags: Microsoft, VBA, Excel2003
Sign Up Now!
Solution Provided By: rorya
Participating Experts: 3
Solution Grade: A
 
 
[+][-]10.07.2008 at 06:12AM PDT, ID: 22659012

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.07.2008 at 06:24AM PDT, ID: 22659105

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628