Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
LISTOBJECT question
it is correct way to complete my task or not
my task is: 1. using combobox i can add and delete items in Listobject object on the worksheet i have 3 components combobo button.add ( add item from combobox to listobject object ) button.delete ( delete item from listobject object ) my function to add items into combobox is next Sub FizikaObjectAdd() With Worksheets(4).ListObjects(1) Set newrow = .ListRows.Add Worksheets(4).Cells(.ListRows(newrow.Index).Range. Row .ListColumns(1).Range.Column).Value = Worksheets(1).combo3.Text Worksheets(4).Cells(.ListRows(newrow.Index).Range. Row .ListColumns(2).Range.Column).Value = CStr(newrow.Index) End With Call ObjectListRefresh End Sub function to delete items from listobject object is next Sub FizikaObjectDelete() With Worksheets(4).ListObjects(1) For c1 = .ListRows.Count To 1 Step -1 If Worksheets(4).Cells(.ListRows(c1).Range.Row .ListColumns(1).Range.Column).Text = Worksheets(1).combo3.Text Then .ListRows(c1).Delete End If Next End With Call FizikaObjectListRefresh End Sub can anyone tell me if my solution correct, why i ask you ?, because i dont realy know is my way to access items i the listobject object correct or not ? for example Worksheets(4).Cells(.ListRows(c1).Range.Row .ListColumns(1).Range.Column).Tex -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
ListObject object formatting | Excel Discussion (Misc queries) | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) | |||
ListObject in Excel 2000 ? | Excel Discussion (Misc queries) | |||
listobject ... Excel2003 | Excel Programming |