Results 1 to 5 of 5

Thread: Need a help with loading data using class module (Derivative & Portfolio)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    VBAX Regular
    Joined
    Sep 2017
    Posts
    16
    Location

    Lightbulb

    "Compile Error: Argument not optional". What does this mean?
    Could you please enlighten me?

    I still get the message " Compile Error: Variable not defined" after I change it as below...


    Sub TestGetPortfolioValue()
    
    
        Dim newPort As Portfolio
        Set newPort = New Portfolio
        Set newPort.Derivatives = PopulateArray()
        
    Dim i As Integer, j As Integer
    Dim Mat As Variant
    Mat = newPort.GetData(Cash)
    
    
    '---------------------------------------------------
    'load output_Cash range with matrix from Getdata() Function
    For i = 1 To 10
        For j = 1 To 3
            Range("Output_Cash").Cells(i, j) = Mat(i, j)
        Next j
    Next i
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •