Results 1 to 2 of 2

Thread: Sheet codenames

  1. #1
    2 Star Lounger
    Join Date
    Apr 2004
    Jacksonville, Florida, USA
    Thanked 0 Times in 0 Posts


    I'm working with a workbook where one of the sheet tabs is named "DCI Data" with the space. I had changed it to "DCIdata" by removing the space, then discovered somebody else has some formulas in it that require that specific name with the space. So I went into properties and changed the (Name) property of the sheet to DCIdata without the space. The references within that workbook work find, but I have a reference to it from another workbook that I'm having a problem with. It's calling that sheet to fill a list box in workbook_open. I wrote this code before I changed the name back to "DCI Data", and need to know how to modify it now that the codename has changed to DCIdata:

    Worksheets("QueryDate").lstTo.ListFillRange = "[real1.xls]DCIdata!$B$6:$B$1696"

    Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts
    The value ListFillRange should be a string with a reference as in a formula in the interface, so you should use the tab name, not the VBA (Name) property:

    "'[real1.xls]DCI data'!$B$6:$B$1696"

    (note the single quotes)

Posting Permissions

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