• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA_HELP_02/19/2015

Ravindra

Member
Hi All,
Greetings for the day !!!!

I am having problem with attached file. It is filling cells while selecting "September" month from combo box. Please see it and help me to fix this problem.

Many-many thanks...
 

Attachments

  • Jan-2015.xlsm
    44.5 KB · Views: 4
Ravindra

That was bizarre, as the code looked, at a quick glance, to be fine

I would change your code to that as per below:

Code:
Private Sub ComboBox1_Change()
Dim month As String
Application.ScreenUpdating = False
Application.EnableEvents = False

month = ComboBox1.Value

Sheet1.Columns("C:BV").EntireColumn.Hidden = True

Select Case month

Case Is = "Show All"
Sheet1.Columns("c:bv").EntireColumn.Hidden = False

Case Is = "January"
Sheet1.Columns("C:H").EntireColumn.Hidden = False

Case Is = "February"
Sheet1.Columns("I:N").EntireColumn.Hidden = False

Case Is = "March"
Sheet1.Columns("O:T").EntireColumn.Hidden = False

Case Is = "April"
Sheet1.Columns("U:Z").EntireColumn.Hidden = False

Case Is = "May"
Sheet1.Columns("aa:af").EntireColumn.Hidden = False

Case Is = "June"
Sheet1.Columns("ag:al").EntireColumn.Hidden = False

Case Is = "July"
Sheet1.Columns("am:ar").EntireColumn.Hidden = False

Case Is = "August"
Sheet1.Columns("as:ax").EntireColumn.Hidden = False

Case Is = "September"
Sheet1.Columns("ay:bd").EntireColumn.Hidden = False

Case Is = "October"
Sheet1.Columns("be:bj").EntireColumn.Hidden = False

Case Is = "November"
Sheet1.Columns("bk:bp").EntireColumn.Hidden = False

Case Is = "December"
Sheet1.Columns("bq:bv").EntireColumn.Hidden = False

End Select

Application.ScreenUpdating = True
Application.EnableEvents = True

End Sub
 
Back
Top