ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   dropdownmenu with additem (https://www.excelbanter.com/excel-programming/341018-dropdownmenu-additem.html)

Peter[_55_]

dropdownmenu with additem
 
Hi again,

next 2 problems i'm struggling with in vba.

Problem 1:
I would like for a cell(A1) to have a dropdownmenu just like a validated
cell, but the list is in a different worksheet of the same workbook.(for
example: sheet2 range $B$B)

Problem 2:
The menu provided have to have the abbility to add new items to that list.

Does anyone have an idea?

Regards,
Peter



Tom Ogilvy

dropdownmenu with additem
 
define a name

Insert = Name =Define

Name: List1
RefersTo: =Sheet3!$A$1:$A$10

then use

=List1

in the textbox where you define the location of the list in data validation

To make it dynamic, change refers to in the named range to be:

=Offset(Sheet3!$A$1,0,0,Count(Sheet3!$A1:$A50),1)

as an example.

--
Regards,
Tom Ogilvy

"Peter" wrote in message
...
Hi again,

next 2 problems i'm struggling with in vba.

Problem 1:
I would like for a cell(A1) to have a dropdownmenu just like a validated
cell, but the list is in a different worksheet of the same workbook.(for
example: sheet2 range $B$B)

Problem 2:
The menu provided have to have the abbility to add new items to that list.

Does anyone have an idea?

Regards,
Peter






All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com