+ Reply to Thread
Results 1 to 12 of 12

Trying to change shape color when selecting toggle button - Code gives Error

  1. #1
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Trying to change shape color when selecting toggle button - Code gives Error

    Hi there,

    Trying to change Shape color when selecting toggle button - Code gives Error...

    Please Login or Register  to view this content.
    Any suggestions would be great!

    John

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    What's the error message and on which line does it occur?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    Compile Error...

    End With without With

    Please Login or Register  to view this content.
    John

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    John

    It's actually an End If and a Next you are missing I think.

    Try this.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    I thought this would work out for changing the colors etc... This code falls apart at

    Please Login or Register  to view this content.
    John
    Last edited by JJFletcher; 04-30-2016 at 12:49 PM.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    John

    How does that code fail?

    What parts of the shape(s) are you tryng to change?

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

  7. #7
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    I indicated where it fell apart...

    I thought this would work out for changing the colors etc... This code falls apart at


    Please Login or Register  to view this content.


    John

  8. #8
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    I probably did not explain this right...

    Let's start over... I have this code and it works great - does everything I want it to do... EXCEPT

    I have a Shape that is being used for the Toggle Button... There are two stages of the Text within the Shape:

    Show.JPGHide.JPG

    The desire is that when the user selects the button, that the Hide portion of the shape changes color (Maybe Green) when the shape button is selected... Can the below Macro be modified to achieve this desired function?

    Please Login or Register  to view this content.

    Thanks in advance,


    John
    Last edited by JJFletcher; 04-30-2016 at 01:57 PM. Reason: Grammer

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    John

    You didn't say what the error was.

    Anyway, is this one shape/control?

    If it is are you trying to format seperate sections of it differently?

    If you are then I think you'll be kind of limited as to what formatting you can apply, for example changing the format of the text shouldn't be a problem but I doubt you'll be able to change the format of the line differently for each section.

  10. #10
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    Hi Norie,

    So if I understand then, I will not be able to manipulate the color background of the Image2 Shape when it is on the Hide text setting to a green color lets say for example?

    Thanks

    John

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    John

    As far as I can see you are trying to change the background colour of separate sections of the shape and as far as I know that isn't possible.

    Changing the background colour of the entire shape shouldn't be a problem.

  12. #12
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Trying to change shape color when selecting toggle button - Code gives Error

    Norie,

    Thanks

    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to change caption in Toggle button (Open/Close) code - Any Suggetions?
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 04-26-2016, 09:01 AM
  2. Replies: 1
    Last Post: 04-23-2016, 04:34 PM
  3. Use a Shape as a Toggle Button to Show and Hide a Worksheet
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2015, 09:49 AM
  4. Need help simplifying code. Shape Color. Complie error: Procedure too large
    By xe-dingo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2014, 07:16 AM
  5. Add command button to shape and change shape color on mouseover
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2012, 05:12 PM
  6. Toggle Shape Line Color VBA
    By cmstroh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2012, 08:26 PM
  7. [SOLVED] Make a Shape behave like a Toggle Button
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2012, 11:43 AM

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