**Urgent help Needed** Run time error 9

D

Dee

Hello, I need help. I created a excel workbook with two sheets. Sheet 1
(AssessmentChart) contains a Pivot chart. Sheet 2 conatins a detail report
(DetailReport) with autofilter on. Workbook saved using Excel 97 - 2003
compatability format. Data from connection to SQL Server. I have users of
Excel 2003 & 2007. I'm using Chart events to allow me to click on bars in
chart to make detail report active and filter it based on the bar that is
clicked. This work perfectly for my Excel 2007 users. When my users of
Excel 2003 click on a bar they get a Run time Error 9 on the following
statement in vba code.

ActiveSheet.ListObjects("Table_CRPRDNMSQXXX_Mytable_DB001_data_vwDetailRptData").Range. _
AutoFilter Field:=29, Criteria1:=strHoldPassWatchFail

strHoldPassWatchFail (data series ) is a global variable that I use to
filter the data in my detail report.
Table_CRPRDNMSQXXX_Mytable_DB001_data_vwDetailRptData is SQL server data
source for detail report. Please help not sure what is going on, why my
Excel 2003 users are getting error.
 
T

The Code Cage Team

Runtime error 9 usually means that the worksheet that you are referencing
does not exist, check your names carefully for typing errors or spaces etc.

Regards,
The Code Cage Team
www.thecodecage.com/forumz
 
D

Dee

thanks for reply Code Cage Team, I check names everything checks out. I
have 30 columns in detail report. three are hidden. could this be causing a
out of range condition when I try filtering on column 29?
 
J

JLGWhiz

There appears to be only two things that it would not find. One is the
ActiveSheet and I think we can eliminate that one as a problem. The other is
your detail report data. If it has not been added to the ListObjects
collection, that could be the problem. But I am only guessing. Somehow it
is not making the connection to the object references in that statement.
 
D

Dee

OK, I will check detail sheet. I still don't understand why Excel 2007
does not an issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top