+ Reply to Thread
Results 1 to 5 of 5

How to use a Defined Name in VBA

  1. #1
    Registered User
    Join Date
    07-02-2014
    Location
    Florida, USA
    MS-Off Ver
    Office 2013
    Posts
    28

    How to use a Defined Name in VBA

    Hello,

    I am trying to use Range one data that has a defined Name called "Titles" and located in Worksheet "TitlesExport".
    I will be using this range in my worksheet Function V-LOOKUP.

    For any reason, I am getting an error, something is wrong. I appreciate any help or input.

    Please Login or Register  to view this content.
    Thanks in advance for any help.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: How to use a Defined Name in VBA

    Hi, Elomaldo,

    any Range needs to be Set not just being equated to a range. And donīt use a VBA Keyword for both a Type and a Variable

    Please try
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    07-02-2014
    Location
    Florida, USA
    MS-Off Ver
    Office 2013
    Posts
    28

    Re: How to use a Defined Name in VBA

    Hello Holger, Thanks foryour time, it is not working. For any reason still came out #Value.
    No idea why is not working.

  4. #4
    Registered User
    Join Date
    07-02-2014
    Location
    Florida, USA
    MS-Off Ver
    Office 2013
    Posts
    28

    Re: How to use a Defined Name in VBA

    Hi Holger,

    Thanks for your input, I was thinking and Rearranging everything, now it works.

    FYI and somebody else you can needed it.

    Please Login or Register  to view this content.
    Thanks for your time and all help

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: How to use a Defined Name in VBA

    The likely reason for the #VALUE! is that something in the function's code has failed, for example the VlookUp.
    If posting code please use code tags, see here.

+ 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. Replies: 1
    Last Post: 05-08-2014, 04:57 AM
  2. Previously working code is now is now giving Application-defined or object-defined error
    By ready2learn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2014, 07:22 PM
  3. [SOLVED] application-defined/object-defined error 1004 when trying to read from or write to cells
    By florin_excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2012, 08:38 AM
  4. [SOLVED] Run Time 1004 - App Defined or Object defined error with String defined path structure
    By sarails in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2012, 09:38 PM
  5. Application Defined or Object Defined Error, Command Button and Vlookup Function
    By stevedomer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-14-2011, 11:20 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