Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
ListObject object formatting RASENT Excel Discussion (Misc queries) 0 October 19th 07 05:00 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
ListObject in Excel 2000 ? NJ Excel Guru Excel Discussion (Misc queries) 1 November 15th 05 12:40 PM
listobject ... Excel2003 Jim C.[_4_] Excel Programming 0 April 3rd 04 10:13 PM


All times are GMT +1. The time now is 03:53 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"