Excel VBA Run Macros on hover over shape

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 51

  • @RandyAustin
    @RandyAustin  6 ปีที่แล้ว +1

    I have started a brand new Excel For Freelancers TH-cam channel with new and UNIQUE training videos each week. I would love your feedback on it:
    th-cam.com/users/ExcelForFreelancers

  • @stevennye5075
    @stevennye5075 5 ปีที่แล้ว +1

    excellent information, your production quality has gretly improved over the last several years.

    • @RandyAustin
      @RandyAustin  4 ปีที่แล้ว

      Thanks so much. This was my first every try at a training video, just for fun over 6 years ago. It's been a long time since i have watched this one. Thanks for your comment.

  • @MichaelDennis-y9g
    @MichaelDennis-y9g ปีที่แล้ว

    You can also get this effect without any additional shapes by just adding a Comment (older versions) or Note (newer versions) to the cell behind button/shape. It doesn't look as good and is less flexible, but it's even easier than this. Also, it doesn't require VBA. All that said, this is still a GREAT workaround to the half-baked Excel object model that has remained unfinished for decades. It appears Microsoft no longer has the talent (or desire) to finish it, instead trying to foist new products (Power Apps, etc) on people that would be unnecessary VBA were ever finished.

  • @AnalyticsInDetails
    @AnalyticsInDetails 7 ปีที่แล้ว +6

    Creative Idea described beautifully

    • @RandyAustin
      @RandyAustin  7 ปีที่แล้ว +1

      vijay kumar thanks so much (I used a terrible microphone many years ago when creating this) Have a look at my new channel "Excel For Freelancers". th-cam.com/channels/XhiOv9VT_0XSnVXyEh4pWw.htmlvideos

  • @felipescherer6678
    @felipescherer6678 4 ปีที่แล้ว +1

    Great workarround for the lack of Hint for Shapes in Excel. Thanks!

  • @ssambhham945
    @ssambhham945 4 ปีที่แล้ว +1

    Excellent explanation.
    It works well if the bigger shape is significantly larger than the smaller shape. But it does not work so well if the shapes are minute such as when you have a small help icon. The way it is described in the video requires the user to move slowly outward to give it enough time over the area of the larger shape to be detected and consequently hide the help shape again. Otherwise, as it is doing with me, the help shape remains visible.
    Any thoughts or alternatives?

    • @RandyAustin
      @RandyAustin  4 ปีที่แล้ว

      Thanks so much Sam, that is correct it should be quite a bit larger. I have an updated video on this on my other channel here: th-cam.com/video/Oe-J3Y_Lbow/w-d-xo.html

  • @sanaaaa007
    @sanaaaa007 8 ปีที่แล้ว +2

    Thanks Randy for this. Macro related question, I am trying to build a macro that connects any two shapes with a line, but not 'fix' it to specific shapes..........
    To give a bit of context:- The excel sheet is being used in a presentation, which will have a number of boxes. - I want to be able to use a macro that inserts a line between any two boxes that are selected. - If I select 2 different boxes, the same macro will still insert a line between.
    I was wondering if you think that is possible?
    Many thanks

    • @RandyAustin
      @RandyAustin  8 ปีที่แล้ว +1

      +sanaaaa007 Hi there, thats a good question, i have not tried that however via VBA you can assign a connector to shapes via the .'AddConnector' operative. I would first single out, then label the selected shapes, then once they are labeled (Shape1, Shape2) you can then assign a connector to them. Perhaps something like this:
      ActiveSheet.Shapes.AddConnector(msoConnectorElbow, 436.2, 105.6, 513, 106.6). _
      Select
      Selection.ShapeRange.ConnectorFormat.BeginConnect ActiveSheet.Shapes( _
      "Rounded Rectangle 1"), 4
      Selection.ShapeRange.ConnectorFormat.EndConnect ActiveSheet.Shapes( _
      "Rounded Rectangle 2"), 2
      I hope that helps a bit, it might be a start what i have provided.

  • @sircorn4248
    @sircorn4248 5 ปีที่แล้ว +1

    Excellent video, as always.

    • @RandyAustin
      @RandyAustin  5 ปีที่แล้ว

      Thanks so much. This is a very old video. I'm glad you liked it

  • @sswapnil84
    @sswapnil84 10 ปีที่แล้ว +1

    This is awesome I will give full marks sir....

  • @ClotBlock
    @ClotBlock 10 ปีที่แล้ว +1

    Hey Randy, I really like the video. However I'm having issues with moving my shape in front of the active x labels. The labels themselves will move forward or backward relative to each other, as will shapes if I have more than one, but the shape itself will not move in front of the labels. If I just make the labels transparent, it won't matter but I was curious if you had any thoughts on how to fix this. Thanks for the video!

    • @RandyAustin
      @RandyAustin  10 ปีที่แล้ว

      ClotBlock Hello There, I am glad you like the video. I do understand your point on placing shapes on top of the labels, however if I can understand what your ultimate goal is then i can perhaps point you in the right direction or make a sections if i can. With the labels transparent you should be able to create any type of look with the shapes themselves as in my sample the labels were just used for their Mouse Move functionality. What is the goal here, or what functionality are you trying to achieve?

    • @ClotBlock
      @ClotBlock 10 ปีที่แล้ว

      Randy Austin I'm just trying to recreate what you do between 4:55 and 5:45 where you place the active x labels behind the rectangular shape object. For whatever reason the active labels and shape will not move behind/in front of the other and my labels always end up in front the shape. As I mentioned, I know that if I just want the same appearance as you have at 6:45 I can just set the labels to be transparent. I just wondering why I cannot move the labels to the back, relative to the shape. Thanks

    • @RandyAustin
      @RandyAustin  10 ปีที่แล้ว

      Hi ClotBlock I just realized, what i believe to be the issue. I have both Excel 2007 and 2010. I am unable to move labels in Front or Back using 2007 however when using Excel 2010 i am able to complete this. Are you using 2007 Excel?

    • @ClotBlock
      @ClotBlock 10 ปีที่แล้ว +1

      Randy Austin , Thanks!! that must be it, I haven't had a chance to look at it on 2010 or later but I was in fact using 2007 Excel when going over this example/exercise. Thank you for your help I really appreciate it. I have already thought of a few ways to work around this, but again I appreciate that you went out of your way to figure this out!

  • @miguelros96
    @miguelros96 10 หลายเดือนก่อน

    en ves de formulario, le coloco esos rectangulos de colores para luego mandarlos a traz y desaparecerlos, buena idea.

  • @umarilyas8583
    @umarilyas8583 3 ปีที่แล้ว

    Is there a way to put like an IF condition before thise to like switch on and off this feature?

  • @ia7meDi
    @ia7meDi 5 ปีที่แล้ว +1

    You are smart! thank you.. I like your content!

  • @sudarmasampath4996
    @sudarmasampath4996 6 ปีที่แล้ว

    Thanks For lot.And Can I handover that VB code in notepad.

  • @sugarcube7984
    @sugarcube7984 4 ปีที่แล้ว +1

    Really helpful,thanks

  • @raghavchadha3151
    @raghavchadha3151 8 ปีที่แล้ว +1

    Thanks Randy for this. However, I can't get the label 'behind' the shape. I'm using this approach to create a rollover; however, due to this, whenever I try to click on that shape (to activate the macro associated with the shape), it ends up selecting the label. Any ideas ? I'm using excel 2007

    • @RandyAustin
      @RandyAustin  8 ปีที่แล้ว

      Hello Ragan, thanks for liking the video. I have also ran into this issue in, 2007 so I used Excel 2010 to complete. I think that this was an issue Microsoft fixed on versions after 2012. I hope this helps. Please let me know if you have any additional questions.

    • @raghavchadha3151
      @raghavchadha3151 8 ปีที่แล้ว +1

      Randy Austin Okay, I tested this on Excel 2010; there seem to be no issues with that. Probably an unresolved bug with the 2007 version. Thanks !

  • @lima7460
    @lima7460 8 ปีที่แล้ว

    Very nice. Very good explanation. Thanks so much.

    • @RandyAustin
      @RandyAustin  8 ปีที่แล้ว

      You are very welcome. Glad you enjoyed it

  • @star_-xn3wt
    @star_-xn3wt 6 ปีที่แล้ว +1

    This video has been so helpful. But is it possible to create two buttons on the same sheet? I have two shapes that are hyperlinked to other sheets and I would like to use the hover over effect on them so that they light up when the cursor rolls over. I have been able to do one with the method described in the video and it works perfectly, but when I to add the code to the second one nothing happens and the first one stops working. I am not an excel expert, just a fiddler and so I don't understand the order of the coding too well. Any help will be appreciated. Thanks!

    • @RandyAustin
      @RandyAustin  6 ปีที่แล้ว

      Hi thanks very much. I have a new channel and a new video which uses this technique (and much better sound quality) You can see it right here: th-cam.com/video/Oe-J3Y_Lbow/w-d-xo.html

  • @James-uz9se
    @James-uz9se 4 ปีที่แล้ว +1

    Can you run this behind another application which is full screen so the macro’s on hoover still activate?

    • @RandyAustin
      @RandyAustin  4 ปีที่แล้ว

      Hi and thanks, this only works within Excel when the application is active

    • @James-uz9se
      @James-uz9se 4 ปีที่แล้ว

      Is there a way to make it work when it’s not active?

  • @lilyfullery4779
    @lilyfullery4779 ปีที่แล้ว

    thanks alot dude

  • @briangehremendoza3678
    @briangehremendoza3678 11 หลายเดือนก่อน

    this is brilliant

  • @Кринж-к9у
    @Кринж-к9у 5 ปีที่แล้ว +1

    Thank you so much! 💘

    • @RandyAustin
      @RandyAustin  5 ปีที่แล้ว

      For sure you are very welcome

  • @ronniewirawan2932
    @ronniewirawan2932 4 ปีที่แล้ว

    I try your code, and now I'm stuck on it whit label are not behind shape? Why it happen, I use Excel 2007? can you give me solution about my problems?

  • @martindraganski917
    @martindraganski917 3 ปีที่แล้ว +2

    Very clever, pity that it needs an ActiveX Control, oh well, stuff Mac users, right?!

    • @RandyAustin
      @RandyAustin  3 ปีที่แล้ว

      Yes not all Macs can work with ActiveX controls. I wish this weren't the case as well

  • @rnamnicattgscindia9268
    @rnamnicattgscindia9268 8 ปีที่แล้ว

    its an awesome tutorial sir! Thanks a lot

    • @RandyAustin
      @RandyAustin  8 ปีที่แล้ว

      Thanks so much. I really appreciate that.

  • @AnujFalcon
    @AnujFalcon 8 ปีที่แล้ว +1

    Awesome!

  • @RandyAustin
    @RandyAustin  6 ปีที่แล้ว

    New videos EACH WEEK with NEVER SEEN BEFORE Techniques in Excel with our Excel For Freelancers channel here: th-cam.com/users/ExcelForFreelancers

  • @JEAGoodman
    @JEAGoodman 8 ปีที่แล้ว

    Brilliant

    • @RandyAustin
      @RandyAustin  8 ปีที่แล้ว

      Thanks so much. Glad you liked it

  • @harithurpu9854
    @harithurpu9854 7 ปีที่แล้ว

    thanks bro..

    • @RandyAustin
      @RandyAustin  7 ปีที่แล้ว

      Your welcome. Happy to share