Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: ActiveCell.Offset(0, -1).Select = Application-defined or object-defined error -[::::Shamran::::]- Excel Programming 7 June 7th 05 02:14 PM
Sub or function not defined error Grant Excel Programming 1 August 31st 04 12:53 AM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Excel Programming 6 June 9th 04 03:40 PM
Runtime Error 1004 -- Application Defined or Object Defined Error John[_51_] Excel Programming 3 September 4th 03 04:28 PM


All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"