+ Reply to Thread
Results 1 to 4 of 4

Mouse over event NOT re-triggering once item has been selected

  1. #1
    Registered User
    Join Date
    04-17-2020
    Location
    England
    MS-Off Ver
    2016
    Posts
    13

    Unhappy Mouse over event NOT re-triggering once item has been selected

    I have been struggling on this one for a few days now and can not seem to work it out. I am using images as buttons, which have a mouseover effect that changes the border to GREEN when the mouse is hovered over them, apart from the problem listed below and them flashing on hover, they work fine. see below for problem.

    I then have an onClick event which changes the border to GREEN if that image/button is selected, this indicates that this is active as the click opens a multi page, this bit also seems to work fine as I had to put in a repaint event in as it would not work without it. UserForm1.Repaint.

    The Problem I am having

    Once a image/button has been selected and then de-selected the mouse over event NO longer works on the image/button that was previously selected.

    Example, If I scroll the mouse over the two buttons below, their borders will change to green on hover, If I selected the WebBrowser button, its border will change to green, indicating that it is active. Once de-selected the mouse over will NO longer work on it. The de-selecting is done by selecting another button.

    This is my mouse over code
    Please Login or Register  to view this content.
    Onclick code
    Please Login or Register  to view this content.
    What I have tried so far.
    • I have tried it with and without the Me. (I left it on Me.)
    • I have tried to google the answer
    • I have tried it without repaint, did not work without repaint, repaint does cause the images to flash.
    • I have tried to place the change boarder colour in the multi-page, so when active that multi page is visible = true then the image border colour will
      change, could not get it to work.
    • I removed the option of turning the borders to Grey on hover, that did not fix the problem.

    The multi-pages will not have their tabs set to visible.

    The only way I can get it to work is via Repaint, how this cause other objects on the userform to flash. on my userform. If someone know how to stop the flashing on repaint, then i would be happy with that as a fix. I tried to google the answer but everything I found was on Application. ScreenUpdating, which was no good

    Please could someone advise on what to do.
    INFO ONLY - I have also posted this on Stackoverflow, however as I am new to this forum I am restricted on posting links yet so can not post a link to that post. I have therefore copied that post over here. I got no replys on that post on StackOverflow. I therefore decided to post here as this is a more dedicated Excel and VBA forum.

    ERROR MESSAGE FOR POSTING A LINK (You are not allowed to post any kinds of links, images or videos until you post a few times.)

    As always thanks in advance.
    Last edited by Sharid; 04-18-2020 at 05:42 AM.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,313

    Re: Mouse over event NOT re-triggering once item has been selected

    see the big yellow banner explaining how to attached workbook

  3. #3
    Registered User
    Join Date
    04-17-2020
    Location
    England
    MS-Off Ver
    2016
    Posts
    13

    Re: Mouse over event NOT re-triggering once item has been selected

    I have had a look and will try to post the workbook or a sample as it does has some sensitive data. I am not at home right now and it is on that pc, so it may be some time before I can do that. I have tried all kinds of methods but nothing seams to work a part from Repaint and that causes the Active Control X objects to flash (textbox, images, buttons and so on). The flash only happens when a image is clicked.

    I am using Images as Buttons, so they will be clicked quite often and therefore the Repaint flickers ever object on the userform.

    Currently the userform is set to Repaint -
    Please Login or Register  to view this content.
    is there a way to set ONLY an object to repaint?
    Thanks for a speedy reply
    Last edited by Sharid; 04-18-2020 at 05:58 AM.

  4. #4
    Registered User
    Join Date
    04-17-2020
    Location
    England
    MS-Off Ver
    2016
    Posts
    13

    Re: Mouse over event NOT re-triggering once item has been selected

    I ok I have fixed this, well more of a work around. I have placed all the buttons into an Active Control X frame and set the layout to Flat which changes the Borders to NONE. I also used the UserForm1.Repaint as a refresh. The frame has stoppend the flicker and the mouseover works. I will need to place other items into frames that are still flickering as the frame resolves the mouseover flickering.
    Last edited by Sharid; 04-18-2020 at 10:26 AM.

+ 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. Delete selected item from ListBox with KeyDown event
    By esbencito in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2020, 03:57 AM
  2. Triggering an event in a csv file
    By mediaeval in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-06-2017, 12:01 PM
  3. Need Help with Event Triggering when value changes
    By calvinloo in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-12-2015, 03:54 AM
  4. EVENT triggering?
    By EXLent in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 08-19-2014, 07:16 AM
  5. Event triggering
    By Sarimdesert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2014, 03:26 AM
  6. VBA Event triggering
    By teachMeExcel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2012, 02:12 PM
  7. Creating Selected Item Changed Event for ListView
    By Kyle123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2011, 09:54 AM

Tags for this Thread

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