+ Reply to Thread
Results 1 to 16 of 16

still cant make a shape fill without clicking

  1. #1
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    still cant make a shape fill without clicking

    for this example.. think of this information:

    shape = rectangle 1

    starting fill colour = 255,255,255 (white)

    I have a cell on the other part of sheet which has a value of 0 - but changes to 1 when I hover over another part of the sheet.

    I need this shape to change fill from white to an image whenever that cell changes value to "1".

    I need all this without clicking on an object! JUST when the cell changes, I can mange it with a click but that's besides the point.


    is this possible?????

  2. #2
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: still cant make a shape fill without clicking

    please see below for sheet
    Attached Files Attached Files

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,439

    Re: still cant make a shape fill without clicking

    Why not call a macro to format rectangle in the rollover macro?

    Given the number of times the rollover routine is called you will probably need to check whether the shape needs updating from previous call.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,439

    Re: still cant make a shape fill without clicking

    This does different colours.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: still cant make a shape fill without clicking

    when guys like you post it makes me realise how little I know. never used mrowlasttime before. don't really understand that. but ill have a try with it? thanks.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,439

    Re: still cant make a shape fill without clicking

    mRowlasttime is just a variable containing the row value last time the rollover routine was executed. If the value is the same then there is no need to update the colour of the shape.

  7. #7
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: still cant make a shape fill without clicking

    ok. thanks, ill try and update your code to incorporate .userpicture " " to see if shape changes image when I rollover.

  8. #8
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: still cant make a shape fill without clicking

    I tried that code and changed the shape name, and I have 17 rollover public functions so changed it to rollover16 etc. and it still does nothing

    I put it in sheet1 code. not a module?

    also my shape is STARTING with an image, does that matter. but whatever I do it isn't changing the shape fill at all

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: still cant make a shape fill without clicking

    Put the code in a module.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  10. #10
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: still cant make a shape fill without clicking

    tried. still didn't work.

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: still cant make a shape fill without clicking

    No. Works fine.
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: still cant make a shape fill without clicking

    ahhhh I have to be honest, I forgot I added that example sheet. I was trying to else where/. thanks mate

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: still cant make a shape fill without clicking

    It's nice that you are honest with that but pls be more carefull when you say just"This does not works". People make efford and spent their time for helping you.

    Good luck.

  14. #14
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: still cant make a shape fill without clicking

    ah I see it may have come across a bit blunt and rude, apologies. wasn't intended. just very busy .

    it works perfectly thanks, one thing - im trying to change it so that instead of a colour, it changes from one image to another now..

    I tried simply replacing the .fillcolor etc with .userpicture. but I cant seem to get it to work.

    is this possible?

  15. #15
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: still cant make a shape fill without clicking

    You have another thread about this.

  16. #16
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,439

    Re: still cant make a shape fill without clicking

    Please Login or Register  to view this content.
    Change picture name and location to suit

+ 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. Replies: 1
    Last Post: 06-30-2013, 05:58 PM
  2. "Clicking" effect to a shape via macro
    By Justair07 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2013, 06:34 PM
  3. Fill selected cells by clicking another cell
    By Tobyriley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2012, 03:23 PM
  4. Display text box when clicking a shape
    By ACap in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2012, 05:55 AM
  5. Copy SeriesCollection fill to a Shape fill
    By Serpiente in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2012, 02:48 PM

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