Object item deletion conditionally

devil_apps

New Member
Joined
May 18, 2010
Messages
8
Hi,

I am writing a VBA code in which I am getting certain records in VBA Object.

The object contains around 1500 records (Item).

Is there any way that I can delete unwanted Items. For example, there is one field MESSAGE_TYPE in object. This field has value either "E" or "A". I want to delete records which has MESSAGE_TYPE = "A".

Is there a query or command through which I can delete all unwanted records without navigating whole 1500 items?

Thanks in advance,
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
You can AutoFilter for MESSAGE_TYPE = "A" then delete the visible records using SpecialCells(xlCellTypeVisible).
 
Upvote 0
You can AutoFilter for MESSAGE_TYPE = "A" then delete the visible records using SpecialCells(xlCellTypeVisible).

Yes you are right.

But my data is in VBA Object (SAP Table factory control) and not in excel spreadsheet. I have to manipulate data in object first and then transfer it to excel.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top