ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dropdown Box On Worksheet (https://www.excelbanter.com/excel-programming/297797-dropdown-box-worksheet.html)

rick

Dropdown Box On Worksheet
 
Hi,

With the dropdown box placed on the worksheet, I've got
everything to work properly - by using the control format
and assigning a macro.

After running the first part of the macro, how do I reset
the dropdown box so that it starts with the first item in
the list?

Sub DropDownBox10()
'~~~Dim Variables~~~

'~~~Code~~~

'~~~Psuedo Code:
'ActiveSheet.Shapes("Drop Down 10").ListIndex = 1
End Sub

Possibly it can't be done that way on a worksheet, but I
thought I would run it by you all.

Thanks, Rick

Melanie Breden

Dropdown Box On Worksheet
 
Hi Rick,

Rick wrote:
With the dropdown box placed on the worksheet, I've got
everything to work properly - by using the control format
and assigning a macro.

After running the first part of the macro, how do I reset
the dropdown box so that it starts with the first item in
the list?

Sub DropDownBox10()
'~~~Dim Variables~~~

'~~~Code~~~

'~~~Psuedo Code:
'ActiveSheet.Shapes("Drop Down 10").ListIndex = 1
End Sub

Possibly it can't be done that way on a worksheet, but I
thought I would run it by you all.


use this Syntax:

ActiveSheet.Shapes("Drop Down 10").ControlFormat.ListIndex = 1

--
Regards
Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)


rick

Dropdown Box On Worksheet
 
Melanie,

Wow! Thanks! Just when I think it can't be done, one of
you have an answer.

Thanks so much, Rick

-----Original Message-----
Hi Rick,

Rick wrote:
With the dropdown box placed on the worksheet, I've got
everything to work properly - by using the control

format
and assigning a macro.

After running the first part of the macro, how do I

reset
the dropdown box so that it starts with the first item

in
the list?

Sub DropDownBox10()
'~~~Dim Variables~~~

'~~~Code~~~

'~~~Psuedo Code:
'ActiveSheet.Shapes("Drop Down 10").ListIndex = 1
End Sub

Possibly it can't be done that way on a worksheet, but I
thought I would run it by you all.


use this Syntax:

ActiveSheet.Shapes("Drop Down

10").ControlFormat.ListIndex = 1

--
Regards
Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

.


Dave Peterson[_3_]

Dropdown Box On Worksheet
 
One mo

ActiveSheet.dropdowns("Drop Down 10").ListIndex = 1

Rick wrote:

Hi,

With the dropdown box placed on the worksheet, I've got
everything to work properly - by using the control format
and assigning a macro.

After running the first part of the macro, how do I reset
the dropdown box so that it starts with the first item in
the list?

Sub DropDownBox10()
'~~~Dim Variables~~~

'~~~Code~~~

'~~~Psuedo Code:
'ActiveSheet.Shapes("Drop Down 10").ListIndex = 1
End Sub

Possibly it can't be done that way on a worksheet, but I
thought I would run it by you all.

Thanks, Rick


--

Dave Peterson



All times are GMT +1. The time now is 10:16 AM.

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