Results 1 to 6 of 6

Hiding Images via Macro

Threaded View

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    australia
    MS-Off Ver
    2010
    Posts
    4

    Question Hiding Images via Macro

    Hi there, this is my first post here, just looking for some help with an assignment i've been given as my lecturer is useless.

    Sorry i meant to post this in Excel section.

    I have created a quiz with images that gives you point upon clicking the correct one, but the problem is you can click any image multiple times until you get the right one.

    I was looking for something that would work like this:

    Click Pic1 >
    Pic2, Pic3 and Pic4 all go invisible

    I know the macro command (.Visible = False) but im not sure how i would code this so it would work?

    Here's what my VB statement looks like at the moment

    Sub Picture6_Click()
    MsgBox "WRONG!", vbOKOnly, "Incorrect"
    Range("G73").Value = "0"
    End Sub
    _________________________________________________________
    Sub Picture7_Click()
    MsgBox "WRONG!", vbOKOnly, "Incorrect"
    Range("G73").Value = "0"


    End Sub
    _________________________________________________________
    Sub Picture8_Click()
    MsgBox "WRONG!", vbOKOnly, "Incorrect"
    Range("G73").Value = "0"


    End Sub
    _________________________________________________________
    Sub Picture9_Click()
    MsgBox "Correctamundo!", vbOKOnly, "Correct"
    Range("G73").Value = "2"


    End Sub
    And heres something i came up with (which encountered errors naturally).

    Sub Hide()
    If Picture6_Click = True Then
    Picture6.Visible = False
    ElseIf Picture7_Click() = True Then
    Picture7.Visible = False
    ElseIf Picture8_Click() = True Then
    Picture8.Visible = False
    Last edited by Sauc; 11-17-2011 at 04:16 AM.

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