+ Reply to Thread
Results 1 to 3 of 3

Setting All Form Control Combo Boxes To A Specified Value

  1. #1
    Registered User
    Join Date
    06-25-2014
    Location
    Michigan, USA
    MS-Off Ver
    Office 2010
    Posts
    2

    Setting All Form Control Combo Boxes To A Specified Value

    Hello everyone,

    I am attempting to place a button in a Excel spreadsheet that upon clicking will set every combobox on the spreadsheet to the first value of the combobox (I am hoping to create different buttons to set all comboboxes to other values). There are a few hundred combo boxes on this spreadsheet so I am looking for a more efficient way than what I have posted below:

    Sub Button1_Click()
    ActiveSheet.Shapes("Drop Down 1").ControlFormat.Value = 1
    ActiveSheet.Shapes("Drop Down 2").ControlFormat.Value = 1
    ActiveSheet.Shapes("Drop Down 3").ControlFormat.Value = 1
    ActiveSheet.Shapes("Drop Down 4").ControlFormat.Value = 1
    ActiveSheet.Shapes("Drop Down 5").ControlFormat.Value = 1

    ...
    End Sub

    I could copy and paste this and change the combobox name on every line but that would be quite tedious.

    Thanks all!

  2. #2
    Registered User
    Join Date
    06-12-2014
    Posts
    42

    Re: Setting All Form Control Combo Boxes To A Specified Value

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-25-2014
    Location
    Michigan, USA
    MS-Off Ver
    Office 2010
    Posts
    2

    Re: Setting All Form Control Combo Boxes To A Specified Value

    This works perfectly! Thank you!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. populating list boxes and combo boxes in a user form.
    By ahceinaej in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2014, 11:54 AM
  2. Filtering & clearing combo control boxes with vba
    By 5150 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2013, 02:11 AM
  3. Main Form Multiple Combo Boxes Control Subform textboxes
    By jvbeats in forum Access Tables & Databases
    Replies: 0
    Last Post: 02-01-2013, 01:36 PM
  4. combo box user form code for two combo boxes
    By robert.begley1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-01-2012, 02:25 PM
  5. combo boxes and calendar control easy ??'s
    By Jlong1980 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2006, 08:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1