Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Clearing Dropdowns In A Worksheet

Hello, what i'm trying to do is this. I have some dropdown boxes from
the forms toolbar, not the control toolbar, in my sheet. I have these
boxes pulling from another sheet that i set up as a database. By using
the index command, i am able to pull various information from the
database sheet depending on the subject selected in the dropdown box.
What I want to do is set up a command button that will reset all the
dropdown boxes back to empty when pressed. I have searched for days
and can not figure this out. Please help!



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Clearing Dropdowns In A Worksheet

Okay, i *FINALLY* got it to work. This is what i did:


Sub Button23_Click()

Dim db As ControlFormat

Set db = ActiveSheet.Shapes("Drop Down 9").ControlFormat

db.ListIndex = 0

End Sub

If there's a better way, i'm always ready to learn. Thanks.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Clearing Dropdowns In A Worksheet

Sub Button23_Click()
Dim drpdwn as DropDown
for each drpdwn in Activesheet.Dropdowns
drpdwn.Listindex = 0
Next
End Sub

for a single dropdown.

Sub Button23_Click()
Activesheet.DropDowns("Drop Down 9").ListIndex = 0
End Sub

--
Regards,
Tom Ogilvy

Aechelon wrote in message
...
Okay, i *FINALLY* got it to work. This is what i did:


Sub Button23_Click()

Dim db As ControlFormat

Set db = ActiveSheet.Shapes("Drop Down 9").ControlFormat

db.ListIndex = 0

End Sub

If there's a better way, i'm always ready to learn. Thanks.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



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
Clearing cells without clearing formulas marsjune68 Excel Discussion (Misc queries) 2 April 10th 09 07:39 PM
clearing "read only" from worksheet kitkat Excel Discussion (Misc queries) 3 July 2nd 08 08:05 PM
Clear a worksheet without clearing formulas? doodah Excel Discussion (Misc queries) 5 January 23rd 07 06:45 PM
using dropdowns Vineet Excel Discussion (Misc queries) 1 January 9th 07 07:46 PM
Worksheet clearing Macros? Arlen Excel Discussion (Misc queries) 4 January 27th 05 04:04 PM


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