Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Fifee
 
Posts: n/a
Default How to add and delete items from a list box or drop down box?

How to add and delete items from a list box or drop down box?
  #2   Report Post  
Matt Lunn
 
Posts: n/a
Default

Hi,

Is the listbox/dropdownbox on a worksheet or a user form?

Matt

"Fifee" wrote:

How to add and delete items from a list box or drop down box?

  #3   Report Post  
kamill
 
Posts: n/a
Default

The box is in a worksheet. If I could find where the list is stored I could
add to it but I can't find it.

Also I thought about making a new box but when I try to copy the information
in the column it won't let me do that either.

"Fifee" wrote:

How to add and delete items from a list box or drop down box?

  #4   Report Post  
Member
 
Location: London
Posts: 78
Default

Quote:
Originally Posted by kamill
The box is in a worksheet. If I could find where the list is stored I could
add to it but I can't find it.

Also I thought about making a new box but when I try to copy the information
in the column it won't let me do that either.

"Fifee" wrote:

How to add and delete items from a list box or drop down box?
Depends on whether the dropdown came from the 'Forms' toolbar or the 'Control Toolbox'.

Also on whether you're wanting to control the information shown in the dropdowns in code or from a worksheet selection.

1. IN CODE:

If from 'Forms', you would use the code
Worksheets("Sheetname").Dropdowns("Dropdownname"). RemoveItem(number of item to delete)

If from 'Control Toolbox', you would use the code
Sheetname.Dropdownname.RemoveItem(number of item to delete-1)
- i.e. the top item is Item No. 0 (zero).


2. AS WORKSHEET SELECTIONS:

If from 'Forms',
- right-click on the dropdown box and select 'Format Control'
- check the address/range entered as the 'Input Range' and modify as necessary to include the additional rows or remove the redundant rows

If from 'Control Toolbox',
- right-click on the dropdown box and select 'Properties'
- a VBA-style property window appears, floating on the worksheet.
- check the address/range entered as the 'ListFillRange' property and modify as necessary.


Hope this helps.

Regards,
BizMark
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



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