Results 1 to 6 of 6

Thread: Solved: Auto Plot Chart routine fails

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,709
    Location
    [vba]
    For Each NameCell In NameRange.Cells
    Set WS = ThisWorkbook.Worksheets(NameCell.Value)
    [/vba]
    There are 65K plus NameCells. Only one has a value. The second time thru, you're trying to Set Ws to Null.

    Try this
    [vba]
    yaddah, yaddah
    If NameRange.Cells.Count > 65000 Then Set NameRange = Range("A4")
    For Each NameCell In NameRange.Cells
    Set WS = ThisWorkbook.Worksheets(NameCell.Value)
    yaddah, yaddah
    [/vba]
    Last edited by SamT; 03-25-2010 at 03:54 PM.

Posting Permissions

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