+ Reply to Thread
Results 1 to 5 of 5

Macros to move Shapes

  1. #1
    Registered User
    Join Date
    09-14-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macros to move Shapes

    Hello,

    I've created a button, using "Shapes" in Excel, with macros which will move it from "Pending" to "Completed" and back(and it works). However, I would like to also have the option to move it to "All" to show both "Pending" and "Completed" rows but I can't figure it out. Would anyone be able to assist me? Thank you in advance! This is what I have to move the button so far:

    Sub MoveBtn()
    With Sheet1
    If .Range("B1").Value = "Pending" Then
    .Shapes("MoveBtn").IncrementLeft 103
    .Range("B1").Value = "Completed"
    Else
    .Shapes("MoveBtn").IncrementLeft -103
    .Range("B1").Value = "Pending"

    End If

    End With

    End Sub

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,530

    Re: Macros to move Shapes

    Does the button have to move and does the text in "B1" need to change?
    You could just change the text, caption, on the button if you want to.
    I also would use the left of the button in relation to the left of the sheet.

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,530

    Re: Macros to move Shapes

    This is just an example of an easy to maintain/change macro.
    Play with it and let us know what you want to change.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,530

    Re: Macros to move Shapes

    This more in line of what you requested in Post #1
    Change the left values and the Button Name (here it is "Button 2")
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-14-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macros to move Shapes

    Thank you, I will try it out and see how it works. I appreciate your help and am constantly and slowly learning about VBA and macros.

+ 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. [SOLVED] VBA to Move Shapes out of Defined Range
    By ChrisHook in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-06-2019, 09:35 AM
  2. [SOLVED] Move Shapes - Loop through all WS not working
    By Janc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-19-2015, 08:51 AM
  3. Different Display Scales move shapes
    By Steveapa in forum Excel General
    Replies: 3
    Last Post: 02-14-2014, 11:31 AM
  4. [SOLVED] Move Two Shapes In The Same Loop
    By primed in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2014, 08:03 AM
  5. how to move excel shapes
    By jonelamora in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-24-2012, 10:45 PM
  6. Move Shapes to Grid in Excel
    By Environment in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2011, 08:40 AM
  7. How To Move Shapes From Another Shapes? (floating shapes)
    By MarcLev in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2009, 04:04 PM

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