+ Reply to Thread
Results 1 to 5 of 5

creating named range in workbook that refers to VBA range

  1. #1
    Registered User
    Join Date
    07-25-2008
    Location
    Tucson, AZ
    Posts
    90

    creating named range in workbook that refers to VBA range

    here is the code I'm trying to run. Hopefully the comments make it clear what I'm trying to do. There are multiple errors:
    1. the named range "output_response_sheet_dv_list" is not being created in the workbook
    2. the For Each/Next loop is erring when I try to populate those cells

    Please Login or Register  to view this content.
    Last edited by twd000; 11-29-2008 at 12:23 PM. Reason: typo

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387
    twd000,

    Please post your workbook - scroll down and see "Manage Attachments".


    Have a great day,
    Stan
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Registered User
    Join Date
    07-25-2008
    Location
    Tucson, AZ
    Posts
    90
    OK, here is the workbook

    It runs the "tally_design_sheets" module at workbook_open, so it should error out right away

    thanks in advance

    Tyler
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387
    twd000,

    I have been stepping thru your code in VBA.

    I am having trouble understanding what is actually going on.

    In Module "tally_design_sheets_" (this caused the first error):
    So, I moved the following Dim statement up to the begining of the module with the rest of the Dim statements:

    Please Login or Register  to view this content.
    Then the next error:

    I found a line of code that I think is not correct (I changed "ranges" to "range"):

    Please Login or Register  to view this content.
    And, in sheet "Post Process Results", the range name "output_response_sheet" is blank.


    The macro now completes, but I do not have a clue.

    I hope the above information helps you to fix the problem.


    See the attached workbook "RATT no password - twd000 - SDG".


    Have a great day,
    Stan
    Attached Files Attached Files
    Last edited by stanleydgromjr; 11-27-2008 at 08:23 PM.

  5. #5
    Registered User
    Join Date
    07-25-2008
    Location
    Tucson, AZ
    Posts
    90
    thanks Stan

    1. OK I'll move the Dim statement with the others
    2. sorry "output_sheet_ranges" is an array of strings that is un-related to "output_sheet_range"
    3. this problem "And, in sheet "Post Process Results", the range name "output_response_sheet" is blank."
    is my main problem
    I am trying to define this named range with the statement:
    Please Login or Register  to view this content.
    but it's not working. The named range does not exist in the sheet until I define it with that VBA code so you won't be able to see it by Insert>Name>Define until the code runs

    any idea what is wrong with this "set range as" statement?
    Last edited by twd000; 11-27-2008 at 07:26 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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