Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Delete Rows from List Objects based on Conidtion

Only a part of code.

Set wrksht = ActiveWorkBook.WorkSheets("Query6")
Set objListobj=wrksht.ListObjects(1)
Set objListRows=objListobj.ListRows

I am getting an error message which says "subscripts out of range", Run time
error '9' at the second line of code shown above
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Delete Rows from List Objects based on Conidtion

Set wrksht = ActiveWorkBook.WorkSheets("Query6")
if wksheet.ListObject.count = 0 then
msgbox "No ListObject"
exit sub
end if
Set objListobj=wrksht.ListObjects(1)
Set objListRows=objListobj.ListRows

--
Regards,
Tom Ogilvy


"george-v" wrote:

Only a part of code.

Set wrksht = ActiveWorkBook.WorkSheets("Query6")
Set objListobj=wrksht.ListObjects(1)
Set objListRows=objListobj.ListRows

I am getting an error message which says "subscripts out of range", Run time
error '9' at the second line of code shown above

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Rows based on condition Vic Excel Discussion (Misc queries) 2 August 18th 09 08:54 PM
Delete Rows based on value Sabosis Excel Worksheet Functions 4 October 28th 08 11:21 PM
Delete Rows Based on Words Cue Excel Discussion (Misc queries) 2 June 4th 08 06:42 AM
Delete Rows based on an external list JEFF Excel Programming 2 June 29th 05 01:18 AM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM


All times are GMT +1. The time now is 06:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"