Excel VBA - How to Change Shape Color on Click

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

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

  • @radenwirawan5351
    @radenwirawan5351 7 หลายเดือนก่อน

    Really helpful, thank you!

  • @pervaizbughio2993
    @pervaizbughio2993 2 ปีที่แล้ว

    Superb you are Genius no doubt, keep it up. Thanx

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

    is that possible in google sheet???

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

    Awesome

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

      You're welcome!
      Sir, to be honest, I'm curious what you'll think when you watch this video: th-cam.com/video/jRgMZCKX3js/w-d-xo.html

  • @CalebCaballero-ef4vs
    @CalebCaballero-ef4vs ปีที่แล้ว

    You really helped me a lot! Thank you!
    Now I'm trying to add a condition that when the shape changes its color so does the font, but I'm struggling a lot. If you can help would appreciate it. :)

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

      You're welcome!
      I have added the code in very short form as requested. I hope it will help you in your work
      ActiveSheet.Shapes.Range(Array("my_shape_name")).Select
      Selection.ShapeRange(1).TextFrame2.TextRange.Font.Fill.ForeColor.RGB = vbRed
      Don't forget to subscribe to the channel.
      Good luck!

    • @CalebCaballero-ef4vs
      @CalebCaballero-ef4vs ปีที่แล้ว

      You won a new subscriber 👏
      And sorry to bother but just one more query...
      I want to copy the text of the shape I click on into a specific cell, so if I click on a shape with letter "A" cell A1 = A but if I click on shape with letter "B" cell A1=B so that I can reference other stuff from cell A1... I've tried a couple of options but I haven't been able to figure it out.
      PS. I want it to keep it dynamically if I need to add more shapes. Greetings

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

      You won a new subscriber - Great! Thank you very much. God bless you!
      Turn on the bell 🔔 so you can be notified of every new video. I have shared many different and interesting videos on this channel. I strongly recommend watching the videos. Like the videos one by one so that more people know about the channel
      The algorithm you mentioned is simple, but if the technical task is complete, it is possible to solve it accordingly.
      For example, I have shared a very valuable video about dynamic objects. You can benefit from it
      Excel VBA - Dynamic Objects| Adding Controls Dynamically| Storing the Controls in the Database - th-cam.com/video/jRgMZCKX3js/w-d-xo.html

  • @mohamedtharik8342
    @mohamedtharik8342 2 ปีที่แล้ว +1

    Dear can you help me,
    What i need is, i created one shape in excel, that shape need to change colour automatically if particular cell has any value.
    Can we do that?

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

    Suppose the shape is on dashboard and its linked to another sheet..so how can we change the shape color when we click it.

  • @jayfernandez184
    @jayfernandez184 9 หลายเดือนก่อน

    How to work if per group
    Example
    Person 1 have own 5 button when click will change color
    Then person 2 have own 5 button when click will change color too

  • @edwarbaez344
    @edwarbaez344 2 ปีที่แล้ว

    Your contribution is interesting. Thanks for the idea. But, I get error "The element with the specified name was not found". Why does that happen?

    • @TheWorldOfAlgorithms
      @TheWorldOfAlgorithms  2 ปีที่แล้ว

      Hi!.
      Thank you for your comment. If you do as I did in the video, there shouldn't be any errors. If possible, send the file you prepared for review

    • @edwarbaez344
      @edwarbaez344 2 ปีที่แล้ว

      @@TheWorldOfAlgorithms Off course. How can I send my file?

    • @ArchieWeber
      @ArchieWeber 2 ปีที่แล้ว +1

      Give the shape a unique name. and if you group shapes you need to name the group.

    • @edwarbaez344
      @edwarbaez344 2 ปีที่แล้ว

      @@ArchieWeber Great! The same code worked when I changed the default names of the shapes. Thank you!

  • @PryadkoAleksey
    @PryadkoAleksey 8 หลายเดือนก่อน

    Doesn't work for me
    "subscript out of range"

  • @indianmonster1445
    @indianmonster1445 9 หลายเดือนก่อน

    How to visible two command button after select row………. With highlight active row vba……
    Sir please share this tutorial

    • @TheWorldOfAlgorithms
      @TheWorldOfAlgorithms  9 หลายเดือนก่อน

      What do you want to do with that, sir ? Say the main goal, let's do the approach accordingly

  • @1GTASANANDREASCJ
    @1GTASANANDREASCJ ปีที่แล้ว

    is it possible to change the color of a command button (ActiveX), when you click on it and the color stays?
    For example:
    command button "start" is grey
    you click on it
    command button "start" will be green until the command is resetted

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

      Hi.
      I think you need ToggleButton, not CommandButton. This is the code you want:
      Private Sub ToggleButton1_Click()
      With ToggleButton1
      If .Value = True Then
      .BackColor = vbGreen
      .Caption = "Stop"
      Else:
      .BackColor = &H8000000F
      .Caption = "Start"
      End If
      End With
      End Sub
      I hope I gained a new and permanent subscriber)

    • @1GTASANANDREASCJ
      @1GTASANANDREASCJ ปีที่แล้ว

      @@TheWorldOfAlgorithms thank you very much. I enjoy your videos!

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

      Your're welcome. This channel serves you. I try to help as much as I can.
      Good luck!

    • @bobarber3977
      @bobarber3977 8 หลายเดือนก่อน

      @@TheWorldOfAlgorithms This was a huge help for me as well. Using toggles as a "task complete" for daily, weekly, and monthly work is there any way to make the toggle revert back to the original color based on the start of a new day, new week and new month?
      I.E daily work toggles start in red, once complete and clicked move to green until the next workday?
      I hope that makes some sense.

  • @danaschoen432
    @danaschoen432 2 ปีที่แล้ว +1

    Not interested in your desktop concert. This would be much better with some good narration.

    • @TheWorldOfAlgorithms
      @TheWorldOfAlgorithms  2 ปีที่แล้ว

      When watching a video without sound, which part is not clear? Do you think that the author's voice must be in the video ?

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

    Not ok.

  • @aydnb.1406
    @aydnb.1406 ปีที่แล้ว

    Doesnt work something wrong bro

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

      Please email me the file you prepared referring to the video I shared so I can check it. The code works fine
      E-mail address: theworldofalgorithms@gmail.com