Combo Box Problem

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Combo Box Problem

  1. #1
    Join Date
    Dec 2012

    Combo Box Problem

    I am having problems with a script that I put into Excel 2007 for a combo box that hides and unhides ranges based upon the selection of the combo box. Works 7 out 10 times. When it doesn't work, it put Excel into some kind of loop that requires that I shut it down and restart. The "VBA reset" button doesn't do anything. Once I restart, the script works again. What am I doing wrong?

    Private Sub ComboBox1_Change() 
        Worksheets("Plan Sheet").Range("c7").Select 
        Selection.EntireColumn.Hidden = True 
        Selection.EntireColumn.Hidden = False 
        Worksheets("Plan Sheet").Range("c7").Activate 
    End Sub

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    Welcome to DevX

    Walk me through this....

    1. You open the spreadsheet
    2. You select something from the combobox
    3. The code runs successfullly
    4. ????? - what do you do next?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Combo Box Problem Please help
    By Steve_8679 in forum VB Classic
    Replies: 1
    Last Post: 05-20-2004, 02:25 AM
  2. Combo Box Problem
    By RealGuru in forum .NET
    Replies: 6
    Last Post: 09-18-2002, 01:23 AM
  3. Combo Box problem
    By Darryl Ray in forum VB Classic
    Replies: 3
    Last Post: 02-17-2001, 11:02 AM
  4. Re: Combo Problem (Thanks)
    By KEVIN in forum VB Classic
    Replies: 0
    Last Post: 10-17-2000, 11:39 AM
  5. Combo Problem
    By Kevin in forum VB Classic
    Replies: 1
    Last Post: 10-17-2000, 11:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center