+ Reply to Thread
Results 1 to 5 of 5

trying to transfer module from ThisWoork to strPath file

  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    trying to transfer module from ThisWoork to strPath file

    when i check the locals and watches windows, the variables are all correct. yet i am getting a Runtime error 9: subscript out of range. what am i doing wrong?

    Please Login or Register  to view this content.
    FNametxt shows as "C:\Users\dmcgovern\Documents\Excel\Module_Code\code.txt" and strPath shows as "C:\Users\dmcgovern\Documents\Excel\Chapter 1 - Strings.xlsm", yet it errors out on this line:
    Please Login or Register  to view this content.
    note that strPath is a public variable

  2. #2
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: trying to transfer module from ThisWoork to strPath file

    any help for why i am getting a run time error?

  3. #3
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: trying to transfer module from ThisWoork to strPath file

    so i changed this:
    Please Login or Register  to view this content.
    to this:
    Please Login or Register  to view this content.
    and its working now

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,915

    Re: trying to transfer module from ThisWoork to strPath file

    You don't include the path when using an index into the Workbooks collection - you just use the file name.
    Rory

  5. #5
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: trying to transfer module from ThisWoork to strPath file

    thanks rorya, i should know better by now.

+ 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. Transfer data from userform to macro in a module, and textbox input as numbers?
    By flabb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2016, 02:25 PM
  2. how to transfer data from Excel file to Word file as per requirement
    By roofi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-25-2014, 01:39 AM
  3. How to skip the current file when using strFile = Dir(strPath & "*.xlsm")
    By kpierce in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2011, 02:29 AM
  4. Export strPath - Runtime Error 70 - Permission Denie
    By EDR in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2009, 03:08 AM
  5. how to access Sheet module, normal module, Worbook module to type code
    By alibaba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2009, 07:51 AM
  6. transfer excel file to text file format
    By tllcll in forum Excel General
    Replies: 1
    Last Post: 07-17-2006, 07:55 AM
  7. [SOLVED] Copy module from one file to another
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2005, 11:05 AM

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