Error: Sub or function not defined

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm new in writing VBA and for the first time I tried to call an Excel
function from the VBA code and I received the error above. Here is the
statement:

Dim StartRowIndex(1 To 6)
Dim xAxisScaleMin(1 To 6)
xAxisScaleMin(i) = RoundDown(StartRowIndex(i) * 1440, 0) / 1440

I'm confused! I assumed that since the Rounddown function is a predefined
excel worksheet function it would work in VBA. What do I have to do?
 
Hi C,

RoundDown is an Excel function, not a VBA function.

Try, therefore:

Application.WorksheetFunction.RoundDown
 
Back
Top