Consulting

Results 1 to 6 of 6

Thread: Hidden ActiveX Controls Disappearing

  1. #1
    VBAX Regular
    Joined
    Apr 2012
    Posts
    15
    Location

    Hidden ActiveX Controls Disappearing

    Hi all,

    I have a spreadsheet in which I have code like the following to make parts of the spreadsheet hide.

    [VBA] If target.Address = "$L$149" Then
    Select Case Worksheets("Activity #2").Range("L149").Value
    Case "0"
    Rows("162:436").EntireRow.Hidden = True
    Case "1"
    Rows("216:436").EntireRow.Hidden = True
    Dim a As Areas, v As Variant
    Set a = Range("162:166,173:174,180:181,187:188,193:194,200:201,206:207,214:215").Ro ws.Areas
    For Each v In a
    v.EntireRow.Hidden = False
    Next v
    End Select
    End If[/VBA]

    It's working great, but within those rows, there are ActiveX option buttons and combo boxes that hide and reappear fine. Unfortunately, whenever I close and reopen the workbook with these controls hidden, they disappear when I reopen.

    Help?!

    Thanks,

    AIDSNGO

  2. #2
    VBAX Regular
    Joined
    Apr 2012
    Posts
    15
    Location
    Hi all,

    Does anyone have any ideas on this? I have put an enormous amount of time into this spreadsheet and would greatly appreciate some help in salvaging it!

    Thanks!

    Julien

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,083
    Location
    Construct a Before Close event which unhides the rows
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  4. #4
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,723
    Location
    Are you using Excel 2010?
    Be as you wish to seem

  5. #5
    VBAX Regular
    Joined
    Apr 2012
    Posts
    15
    Location
    Thanks, Aussiebear! Can you give me an idea what that would look like?

    Thanks!

    AIDSNGO

  6. #6
    [vba]Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Sheets("Activity #2").Rows.Hidden = False
    End Sub[/vba]

Posting Permissions

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