Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Sep 2008
    Thanked 0 Times in 0 Posts

    VBA Color Change (Excel 2003)

    I'd like to find some code that would hopefully change the color of a drawn hyperlinked picture once it has been clicked on. I have a number of spread sheets in which I've drawn some hyperlinked text boxes which look like buttons. I'd like them to change color to indicate that they have been clicked on. Thanks to everyone.
    Attached Files Attached Files

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Pittsburgh, Pennsylvania, USA
    Thanked 342 Times in 335 Posts

    Re: VBA Color Change (Excel 2003)

    You will have to use the macro to also goto Test. If you have a hyperlink the hyperlink is used and the macro is not run. You can add this macro to a module. Assign the macro to the button and then delete the hyperlink. When the button is pressed it will change from red to blue and then goto Test.

    <pre>Sub ChangeToBlueGotoTest()
    ActiveSheet.Shapes(Application.Caller). _
    Fill.ForeColor.RGB = vbBlue
    Application.Goto Reference:="TEST"
    End Sub</pre>


Posting Permissions

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