+ Reply to Thread
Results 1 to 4 of 4

How to use Standard Excel function in VBA

  1. #1
    Registered User
    Join Date
    08-20-2007
    Posts
    60

    How to use Standard Excel function in VBA

    Hello,

    I am trying to use standard excel function CEILING to round up. But I am getting an error: "Sub or Function not defined" - Help please

    Please Login or Register  to view this content.
    In the above example, should get a result 11

    Thanks in advance.
    Anil

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Try
    Please Login or Register  to view this content.
    Can you incorporate that at all?

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Akabraha,

    You need to prefix the Excel function with the WorsheetFunction statement like this...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  4. #4
    Registered User
    Join Date
    08-20-2007
    Posts
    60
    Thanks a lot BigBas and Leith Ross - you guys are so quick!!

    Please Login or Register  to view this content.
    above code worked just fine.

    Please Login or Register  to view this content.
    when I tried to add ActiveSheet as shown above, it gave me an error: "Object doesn't support this method or property"

    Have a great weekend.

    Thanks, Anil
    Last edited by akabraha; 08-24-2007 at 03:55 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1