Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2000 Macro hangs in 2003

Status
Not open for further replies.

Redpop

Technical User
Sep 27, 2005
7
US
My predecessor in this analyst position has written some dandy macros to facilitate automated report processing. He wrote them in Excel 2000, where I have 2003.

This particular macro is one of many in a larger macro. The big one creates a new group of files from a single worksheet from rows of data matching the categories (Manager names) shown on each line.

This section is supposed to find unique values in the category (Manager names) column of over 4000 entries, and paste this list into the "Names.xls" file.
- Names.xls has already been created and opened.
- The data in the Manager name column has already been highlighted.

The macro hangs where the unique value is identified.. saying
Run-time error '9':
Subscript out of range

Here's the macro code - the offending line is bold:

Sub TestFindUniqueValues()
' FindUniqueValues Range("Managers"), Sheets("Stats").Range("A1")
FindUniqueValues Range("Managers_Names"), Application.Workbooks("Names").Worksheets("Sheet1").Range("A1")
End Sub

Is there a difference in the way 2003 identifies things, or do I just have some check box unchecked!?

Thanks

-Redpop
 


Code:
FindUniqueValues Range("Managers_Names"), Application.Workbooks("Names[b].xls[/b]").Worksheets("Sheet1").Range("A1")


Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Fabulous! Worked like a charm.. all the way through.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top