+ Reply to Thread
Results 1 to 2 of 2

pathway reference to file givs out of range errormsg (pathway is set as variable)

  1. #1
    Registered User
    Join Date
    08-15-2014
    Location
    Slovakia
    MS-Off Ver
    7
    Posts
    6

    pathway reference to file givs out of range errormsg (pathway is set as variable)

    Hello,

    I have a small problem when reffering to excel file in VBA code with its location on the disc. Basically I have a textbox in userform, where I paste path to particular exce file and I need to display the sheets name in ListBox.
    This is the beggining o the code...

    Please Login or Register  to view this content.
    The problems appears to be in third line of this part, sice apparently, when trying to use variable "zosit" it will not locate the file...

    Please Login or Register  to view this content.

    Thank you for your help...
    Last edited by phila7475; 08-20-2014 at 05:18 AM.

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

    Re: pathway reference to file givs out of range errormsg (pathway is set as variable)

    zosit is declared inside the first procedure so it is out of scope to the second. You'd need:
    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

+ 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. Skip Manual Selection of Pathway to Reference Workbook
    By SteVo556 in forum Excel General
    Replies: 1
    Last Post: 01-03-2014, 11:21 PM
  2. Redirecting Pathway in Macro
    By Zan03 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2010, 06:50 PM
  3. Changing Pathway in macro
    By Zan03 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2010, 05:11 PM
  4. [SOLVED] CAN YOU CREATE A PATHWAY OF CELLS LIKE A PROGRAM
    By Dean Costa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2006, 05:35 PM
  5. Vlookup Pathway
    By Daffy Duck in forum Excel General
    Replies: 5
    Last Post: 06-16-2005, 04:05 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