+ Reply to Thread
Results 1 to 2 of 2

how to hide multiple images on userform

  1. #1
    Registered User
    Join Date
    11-25-2012
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Post how to hide multiple images on userform

    I have multiple images on a userform, and I need to be able to hide them all at the click of a button. the button name is IMH1, and the images are numbered Image1 through Image37


    I have tried a for each , next loop but to no avail, so I deleted it, but I am sure the answer lies with that loop somewhere. Unfortunately I don't know enough vba to suss it, can anyone help please?

    Thank you

    Merry Christmas

  2. #2
    Registered User
    Join Date
    11-25-2012
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: how to hide multiple images on userform

    Please don't think I am Post bombing. I am just sharing my cure.

    The cure was in the for each next loop please see the coding below as this worked just right



    Private Sub IMH1_Click()

    If Model_No = "" Then
    For Each Ctrl In Sprinkler_Options.Controls
    Select Case TypeName(Ctrl)
    Case Is = "Image"
    Ctrl.Visible = False
    End Select
    Next Ctrl
    End If
    End Sub

    Thank you to all who viewed this post.
    Last edited by darkone1965; 12-19-2012 at 04:05 PM.

+ Reply to Thread

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