VLookup path coding to point to another workbook
Results 1 to 4 of 4

Thread: VLookup path coding to point to another workbook
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Apr 2019
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default VLookup path coding to point to another workbook

    This code below works when I was going to keep the LoginDatabase sheet 1 in the same workbook. Any thoughts on modifying u = to point the VLookup to the LoginDatabase sheet 1 in another workbook. I know I need to add a path to where the workbook is located “C:\CE Program\Database.xlsm” Sheet(“LoginDatabase”) but I’m just not getting it right for some reason.
    TY for any help...



    Dim u As String

    u = WorksheetFunction.VLookup(Me.username, Sheets("LoginDatabase").Range("A2:B10"), 2, 0)

  2. #2
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling, Scotland
    Posts
    75,123
    Post Thanks / Like
    Mentioned
    60 Post(s)
    Tagged
    6 Thread(s)

    Default Re: VLookup path coding to point to another workbook

    Is the workbook Database.xlsm open?
    If posting code please use code tags.

  3. #3
    New Member
    Join Date
    Apr 2019
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VLookup path coding to point to another workbook

    no it will not be open

  4. #4
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling, Scotland
    Posts
    75,123
    Post Thanks / Like
    Mentioned
    60 Post(s)
    Tagged
    6 Thread(s)

    Default Re: VLookup path coding to point to another workbook

    You can't use Application.Vlookup with a closed workbook.
    If posting code please use code tags.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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