+ Reply to Thread
Results 1 to 6 of 6

Variable as Name

  1. #1
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Variable as Name

    Hello everyone,
    I came across this function macro. It looks pretty simple yet I have no idea how to understand it particularly the variable defined as Name.
    Would someone be able to explain please as I never came across this before and I'm still in the bottom learners when it comes to vba.
    Thank you.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Variable as Name

    It checks whether there is a defined Name (Formulas tab, Name manager) with the specified name in the workbook.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,046

    Re: Variable as Name

    Looks like it was written in French, either because the author was French or s/he was avoiding using reserved words like Name and Names. Rory has explained the reason/use for/of the function.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,645

    Re: Variable as Name

    Hi there,

    The function is used to determine whether or not a specifically-named workbook-level Name has been defined in a workbook.

    The following code shows an annotated English-language version of the routine, and also an alternative way of determining the result:

    Please Login or Register  to view this content.

    Hope this helps.

    Regards,

    Greg M
    Last edited by Greg M; 09-06-2021 at 07:07 AM. Reason: Typo corrected

  5. #5
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Variable as Name

    I finally managed to understand the whole function. Very grateful for all your help and contribution. All best.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,046

    Re: Variable as Name

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Public variable and Runtime error 91: Object Variable or With block variable not set
    By Frank Nunez in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-31-2020, 04:02 PM
  2. [SOLVED] Object variable or With block variable not set when copying chart to outlook email body
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-09-2019, 04:17 PM
  3. [SOLVED] Macro to select a variable cell range and copy it down a variable amount of times
    By JPoFresh in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 07-18-2019, 09:17 PM
  4. Replies: 3
    Last Post: 02-17-2015, 11:53 PM
  5. Replies: 4
    Last Post: 07-12-2013, 12:14 PM
  6. Replies: 6
    Last Post: 12-21-2012, 08:03 AM
  7. Replies: 3
    Last Post: 11-21-2012, 03:28 PM

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