borderAndreaVB free resources for Visual Basic developersborder

AndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincani

AndreaVB Home | News Home | Forum Home | Downloads | Register | Search | PM | Profile

Previous Topic (Access Help With Visual Basic)Next Topic (Access 2007 VBA) New Topic Post Reply
AndreaVB OnLine : VBA (Access, Excel, Word, ...) : =excelfunction in loop
Poster Resource
AutoQuant
Level: Trainee

Registered: 13-08-2009
Posts: 1
icon =excelfunction in loop

Hello,

I am new to VBA.

I want to use a function within a loop and reference cells location in the arguments of the function as well as the location.  I know this code does not work, but I think it illustrates what I want to do:

For r = 1 To 10
    Cells(r, 1).Value = Application.Yield(Cells(r, 2).Value, Cells(r, 3).Value, Cells(r, 4).Value, Cells(r, 5).Value, Cells(r, 6).Value, Cells(r, 7).Value)
Next r

I tried "=Yield(..." but how do I increment the arguments?
I tried Application.Run("Yield".., but that did not work either.

Thanks!  
Ben

____________________________
Trading Strategy Automation and Consulting

13-08-2009 at 04:31 PM
View Profile Send Email to User Show All Posts | Add Comment
AndreaVB OnLine : VBA (Access, Excel, Word, ...) : =excelfunction in loop
Previous Topic (Access Help With Visual Basic)Next Topic (Access 2007 VBA)New Topic Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincaniborder