+ Reply to Thread
Results 1 to 7 of 7

VBA to select all comboboxes on a sheet

  1. #1
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    276

    VBA to select all comboboxes on a sheet

    Hello, I have more than 50 combo boxes (form control) in one column on a sheet, I need to grab them all and do a resize. What is the VB for selecting all combo boxes on a sheet? only found some codes doing deleting and not selecting them all...

    thanks so much!
    Last edited by lynnsong986; 01-24-2020 at 12:41 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,028

    Re: VBA to select all comboboxes on a sheet

    Are they activex combobox?
    Maybe this:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    276

    Re: VBA to select all comboboxes on a sheet

    Thank you so much Akuini, I'll for sure keep this but those are actually form control combo boxes, how should I tweak this?

  4. #4
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    276

    Re: VBA to select all comboboxes on a sheet

    PHP Code: 
    Sub ResizeFormControlComboBox()
    Dim s As Shape

        
    For Each s In ActiveSheet.Shapes
             
    If s.Type msoFormControl Then
     
    If s.FormControlType 2 Then
                s
    .Width 120
            End 
    If
            
    End If
        
    Next

    End Sub 

  5. #5
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    276

    Re: VBA to select all comboboxes on a sheet

    I found some codes and tweaked it a bit, this works... thanks so much!

  6. #6
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,028

    Re: VBA to select all comboboxes on a sheet

    Glad you figured it out.

  7. #7
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    276

    Re: VBA to select all comboboxes on a sheet

    Thank you for your help!!

+ 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. Multiple PivotTables and ComboBoxes to select PT and filter
    By simi_uk in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 08-19-2019, 10:58 AM
  2. Replies: 3
    Last Post: 02-18-2015, 02:02 PM
  3. Help! Entire Row Hidden - w/Two ComboBoxes - Doesn't Hide the ComboBoxes
    By ocnmel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-06-2015, 09:27 AM
  4. Replies: 3
    Last Post: 09-03-2014, 09:59 AM
  5. [SOLVED] ComboBoxes with Select Case
    By excellenthelp in forum Excel General
    Replies: 4
    Last Post: 09-12-2013, 12:51 PM
  6. Select Cases and Comboboxes
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2011, 11:13 PM
  7. [SOLVED] ++HELP ME PLEASE++ ComboBoxes as a Variable to Select Sheets
    By Adeptus - ExcelForums.com in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-10-2005, 12:05 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