Results 1 to 1 of 1

How do i hide buttons when starting excel workbook?

Threaded View

  1. #1
    Registered User
    Join Date
    06-14-2008
    Posts
    26

    How do i hide buttons when starting excel workbook?

    how do i hide buttons when starting a workbook?

    and then how do i unhide the button when i click the SUBMIT button?

    The button will contain a recorded macro but that is nothing to worry about...

    and how do i hide multiple buttons?
    Private Sub CommandButton1_Click()
    
     'CLOSE BUTTON
      Me.Hide
      Unload Me
      
    End Sub
    
    Private Sub CommandButton2_Click()
    
     'SUBMIT BUTTON
       Dim Rng As Range
       Dim Total As Double
       
         With ListBox1
           For I = 0 To 11
             Set Rng = Range(.List(I, 1))
             If .Selected(I) = False Then
               Rng.EntireColumn.Hidden = True
             Else
               Rng.EntireColumn.Hidden = False
               Total = Total + Rng.Cells(51, 4).Value
             End If
           Next I
         End With
      
         Range("$AV$51").Value = Total
         
    End Sub
    
    Private Sub CommandButton3_Click()
    
     'RESET BUTTON
      Dim I As Integer
      
        For I = 0 To 11
          ListBox1.Selected(I) = False
        Next I
        
        Range("A:AV").EntireColumn.Hidden = False
        
    End Sub
    
    Private Sub UserForm_Activate()
    
      Dim I As Integer
      
        With ListBox1
          .Clear
          For I = 0 To 11
            .AddItem
            .List(I, 0) = WorksheetFunction.Choose(I + 1, "January", "February", "March", _
                                                          "April", "May", "June", _
                                                          "July", "August", "September", _
                                                          "October", "November", "December")
            .List(I, 1) = WorksheetFunction.Choose(I + 1, "A:D", "E:H", "I:L", "M:P", _
                                                          "Q:T", "U:X", "W:AB", "AC:AF", _
                                                          "AG:AJ", "AK:AN", "AO:AR", "AS:AV")
          Next I
        End With
        
    End Sub
    Thanks So Much.....

    how do i hide a button when excel starts?
    Last edited by Simon Lloyd; 06-17-2008 at 04:16 AM. Reason: Duplicate posts?
    Love,


    Jenn

Thread Information

Users Browsing this Thread

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

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