Results 1 to 10 of 10

Thread: [RESOLVED] change the size of combobox with column size

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    73

    Resolved [RESOLVED] change the size of combobox with column size

    i have a cmb1 on column C
    i wana change the size of combobox with column size

  2. #2
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: change the size of combobox with column size

    Right-click it, choose Format Control. Go to Properties tab and choose Move and size with cells.

    zaza

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    73

    Re: change the size of combobox with column size

    ya it working fine
    how the selected item from the combo box , will apear on cell

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    73

    Re: change the size of combobox with column size

    how the combox will invisible after item select

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    73

    Re: change the size of combobox with column size

    on cell click combo will apear otherwise remain invisible
    plz help

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: change the size of combobox with column size

    I think this is what you are asking for.
    VB Code:
    1. Option Explicit
    2. 'Behind sheet1 with a Combox1 residing in Cell A1
    3. Private Sub ComboBox1_Click()
    4.     ComboBox1.Visible = False
    5. End Sub
    6.  
    7. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    8.     If ActiveCell.Address = "$A$1" Then ComboBox1.Visible = True
    9. End Sub
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    73

    Re: change the size of combobox with column size

    thankx
    ya it working fine for one cell
    if i have combobox on many cells like C1,C2,C3,A1,A2, than what

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: change the size of combobox with column size

    Many combos will require many evaluations.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: change the size of combobox with column size

    Are you aware that, with a cell selected, you can go to the Data menu, choose Validation and select the List type. Then, in the Source box, you can select a range from the spreadsheet and this will give you something like a combobox in the cell without having to use the object.
    From the sounds of it, this would be more up your street.

    zaza

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    73

    Re: change the size of combobox with column size

    ya this methodis working fine

Posting Permissions

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



Click Here to Expand Forum to Full Width