+ Reply to Thread
Results 1 to 5 of 5

Application.WorksheetFunction

  1. #1
    roger09
    Guest

    Application.WorksheetFunction

    Hi all,

    Is there any difference in using Application.WorksheetFunction over WorksheetFunction in VB?

    Thanks
    Last edited by roger09; 09-28-2011 at 01:32 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Application.WorksheetFunction

    See this article
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Application.WorksheetFunction

    That article is inside-out from the question. The question is what is the difference between using
    Application.WorksheetFunction.<function>
    and
    WorksheetFunction.<function>
    There isn't any difference between these two. WorksheetFunction is a property of Application where Excel is the application. If you omit Application as a qualifier, the default is Excel, and the same function is invoked. I was surprised to find out the qualifier is not required, as I just verified, because it is required for other properties like ScreenUpdating.

    The article, OTOH, talks about the difference between
    Application.WorksheetFunction.<function>
    and
    Application.<function>

    which is different.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Application.WorksheetFunction

    IMO, you should always use Application.WorksheetFunction as I have seen instances where it fails without the Application qualifier.
    Remember what the dormouse said
    Feed your head

  5. #5
    roger09
    Guest

    Re: Application.WorksheetFunction

    Thanks to royUK, 6StringJazzer and romperstomper for your time.

    Cheers

+ 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