Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error: Sub or function not defined
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error: Sub or function not defined
Hi C,
RoundDown is an Excel function, not a VBA function. Try, therefo Application.WorksheetFunction.RoundDown --- Regards, Norman "cwilliams" wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
error: ActiveCell.Offset(0, -1).Select = Application-defined or object-defined error | Excel Programming | |||
Sub or function not defined error | Excel Programming | |||
Macro Run-time Error 1004 Application Defined or Object Defined Error | Excel Programming | |||
Runtime Error 1004 -- Application Defined or Object Defined Error | Excel Programming |