Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Deleting rows from a combobox

On a form, users enter data into 5 text boxes. This
builds a string based on on their input. The string is
then added as 1 row in a combobox.

Later on, users have the option to review all of the
entries and select one. Once they select one, I have
a "delete" button. If they push this button, I would like
to delete the row from the combobox but I'm not sure how
to do this.

I also would like to know how to find the number of items
in the combobox. The first line of the combobox is a 3
digit counter. I would like to revise the counter and
update each row after the deleted row so all of the line
numbers remain sequential.

Any suggestions would be appreciated. Thanks.....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Deleting rows from a combobox

"JT" wrote:
Later on, users have the option to review all of the
entries and select one. Once they select one, I have
a "delete" button. If they push this button, I would like
to delete the row from the combobox but I'm not sure how
to do this.


The currently selected ComboBox item is available through the ListIndex
property. You can delete the currently selected item from the list with

ComboBox1.RemoveItem (ComboBox1.ListIndex)

Note that that won't update the text in the ComboBox. To get rid of the old
selected value, set the ListIndex property to -1

ComboBox1.ListIndex = -1

The number of items in the list is available through the ListCount property
of the ComboBox. You should be able to use that to update your ComboBox
items.

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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Worksheet Functions 1 November 12th 08 01:39 PM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM


All times are GMT +1. The time now is 02:55 PM.

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

About Us

"It's about Microsoft Excel"