ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Drowdown menu reset (https://www.excelbanter.com/excel-programming/309640-drowdown-menu-reset.html)

Rasmus[_2_]

Drowdown menu reset
 
What is the command for resetting dropdown menus ?

Ie.
Application.Shapes("dropdown164")... if I want it to be 'reset' to the first
line in the dropdownmenu after a change ?

Rasmus



Frank Kabel

Drowdown menu reset
 
Hi
set the listelement property to '-1'

--
Regards
Frank Kabel
Frankfurt, Germany

"Rasmus" schrieb im Newsbeitrag
t.cable.rogers.com...
What is the command for resetting dropdown menus ?

Ie.
Application.Shapes("dropdown164")... if I want it to be 'reset' to

the first
line in the dropdownmenu after a change ?

Rasmus




Tom Ogilvy

Drowdown menu reset
 
Activesheet.Dropdowns("DropDown164").Listindex = 0

--
Regards,
Tom Ogilvy


"Rasmus" wrote in message
t.cable.rogers.com...
What is the command for resetting dropdown menus ?

Ie.
Application.Shapes("dropdown164")... if I want it to be 'reset' to the

first
line in the dropdownmenu after a change ?

Rasmus





Tom Ogilvy

Drowdown menu reset
 
Dropdowns from the forms toolbar use zero rather than -1 for this.

--
Regards,
Tom Ogilvy


"Frank Kabel" wrote in message
...
Hi
set the listelement property to '-1'

--
Regards
Frank Kabel
Frankfurt, Germany

"Rasmus" schrieb im Newsbeitrag
t.cable.rogers.com...
What is the command for resetting dropdown menus ?

Ie.
Application.Shapes("dropdown164")... if I want it to be 'reset' to

the first
line in the dropdownmenu after a change ?

Rasmus






Frank Kabel

Drowdown menu reset
 
Hi Tom
thanks for the correction.

--
Regards
Frank Kabel
Frankfurt, Germany

"Tom Ogilvy" schrieb im Newsbeitrag
...
Dropdowns from the forms toolbar use zero rather than -1 for this.

--
Regards,
Tom Ogilvy


"Frank Kabel" wrote in message
...
Hi
set the listelement property to '-1'

--
Regards
Frank Kabel
Frankfurt, Germany

"Rasmus" schrieb im Newsbeitrag

t.cable.rogers.com...
What is the command for resetting dropdown menus ?

Ie.
Application.Shapes("dropdown164")... if I want it to be 'reset'

to
the first
line in the dropdownmenu after a change ?

Rasmus







Rasmus[_2_]

Drowdown menu reset
 
"Tom Ogilvy" skrev i en meddelelse
...
Activesheet.Dropdowns("DropDown164").Listindex = 0


Thanks for your answers guys. However this one gices me the message:

'Unable to get the DropDowns property of this Worksheet class' ?

Rasmus



Rasmus[_2_]

Drowdown menu reset
 
"Tom Ogilvy" skrev i en meddelelse
...
Activesheet.Dropdowns("DropDown164").Listindex = 0


Thanks for your answers guys. However this one gices me the message:

'Unable to get the DropDowns property of this Worksheet class' ?

Rasmus



Tom Ogilvy

Drowdown menu reset
 
for me, with a dropdown from the forms toolbar named DropDown164, it clears
the selection - as you asked:

Activesheet.Dropdowns("DropDown164").Listindex = 0

If you chose some goofy name for an activeX Combobox, then perhaps you want

Activesheet.OleObjects("DropDown164").Object.ListI ndex = -1

We can only guess at what type of control you are working with. Maybe you
really are using a CommandbarCombobox control (since you said dropdown
menu), but that certainly wouldn't be in the shapes collection.

--
Regards,
Tom Ogilvy


"Rasmus" wrote in message
.cable.rogers.com...
"Tom Ogilvy" skrev i en meddelelse
...
Activesheet.Dropdowns("DropDown164").Listindex = 0


Thanks for your answers guys. However this one gices me the message:

'Unable to get the DropDowns property of this Worksheet class' ?

Rasmus






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

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