+ Reply to Thread
Results 1 to 5 of 5

Floor Plan Macro - Need help troubleshooting 'Run time error 9' error message

  1. #1
    Registered User
    Join Date
    05-07-2021
    Location
    STL USA
    MS-Off Ver
    2014
    Posts
    13

    Post Floor Plan Macro - Need help troubleshooting 'Run time error 9' error message

    Hello all,

    Recently I made a post in the formula forum. I needed help developing a way to make a floor plan within Excel. I ended up with a working prototype due to the help of some wonderful people, and I began to work on applying the code they supplied me with on a much higher level.

    Here is the code that was given to me on the forum. This code works perfectly, albeit within only one workbook.

    Please Login or Register  to view this content.
    Sheet 1 refers to the TEMPLATE of the floor plan.
    Sheet 2 refers to the EMPLOYEE DIRECTORY that contains a basic table. This table starts at A1, and within it is the room # of the employee (column A) and the name of the employee (column D)
    Sheet 4 refers to the FINAL FLOOR PLAN - This is what will be populated with data from the EMPLOYEE DIRECTORY, referencing the TEMPLATE to correctly place the names.

    Although this code works great, it only works within one workbook. The desired end goal of this project is to have 3 separate workbooks. One workbook will contain all of the templates, one will contain all of the directories, and one will contain all of the populated floor plans. The workbook with the populated floor plans will be used regularly to keep track of employee/tenant locations. The other two workbooks will be updated regularly as employees/tenants change.

    Therefore, I modified the code I was given to try and complete this task. I ended up with this:


    Please Login or Register  to view this content.
    When I run this code, I get an error message (Run Time Error 9: Subscript out of Range)
    When I F8 throughout the code, the error message occurs once I pass the Set functions (Ln22)

    There is a very solid chance that I am making a very simple error; I am fairly new to VBA and most of this stuff is going over my head, although I am learning fast.

    Attached are the 3 workbooks if you would like to try it out for yourself. Thank you for helping me out!

    -Liddy
    Attached Files Attached Files

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Floor Plan Macro - Need help troubleshooting 'Run time error 9' error message

    .
    I believe you need to provide the entire path to each workbook.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Floor Plan Macro - Need help troubleshooting 'Run time error 9' error message

    If problem is with "Set"
    If It is workbook all the files should be in the same folder in which this macro file exists. Otherwise entire path of file should be included.
    If it worksheet That Sheet may be missing.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Registered User
    Join Date
    05-07-2021
    Location
    STL USA
    MS-Off Ver
    2014
    Posts
    13

    Re: Floor Plan Macro - Need help troubleshooting 'Run time error 9' error message

    Quote Originally Posted by Logit View Post
    .
    I believe you need to provide the entire path to each workbook.
    Quote Originally Posted by kvsrinivasamurthy View Post
    If problem is with "Set"
    If It is workbook all the files should be in the same folder in which this macro file exists. Otherwise entire path of file should be included.
    If it worksheet That Sheet may be missing.

    Is this a step in the right direction?
    Please Login or Register  to view this content.
    I am confused about how excel would like these workbooks to be called upon. When I look it up online, sometimes it says that the workbook has to be active before I call upon it. Other sites say that I can use the method I am using, however, it is obviously not working.

    I still get the same error when I run this code, in the same location.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Floor Plan Macro - Need help troubleshooting 'Run time error 9' error message

    Change it this way for all files
    Please Login or Register  to view this content.

+ 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. Error message. Run Time Error 13, Type Mismatach
    By Nitro2481 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2020, 09:22 AM
  2. Getting error message- Run-time error '13'; type mismatch
    By UPA in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2017, 03:43 AM
  3. Replies: 2
    Last Post: 02-03-2016, 12:23 PM
  4. [SOLVED] Error message: Run-Time error '1004 '; application-defined or object-defined error
    By Davasu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2015, 06:52 AM
  5. Replies: 1
    Last Post: 10-22-2015, 05:50 AM
  6. Error Message: Run-time error '1004':
    By joemo63 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-25-2012, 04:14 AM
  7. Excel XP error message Run Time Error 91
    By Lenny in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2005, 07:06 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