+ Reply to Thread
Results 1 to 2 of 2

Move Label Button with cell value

  1. #1
    Registered User
    Join Date
    01-29-2012
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    25

    Move Label Button with cell value

    Hi

    I am having a command button on sheet1 on cell "E9". I need three conditions to be fulfilled.

    1. When the button is clicked it should expand the hidden 7 rows below with caption "hide"
    2. When the button is clicked again, it should hide the 7 rows below with caption "Enter"
    3. If the value in Cell "E9" is greater than zero the button should move to left ie "D9" with caption "Amend", else remain same in the position,with caption "Enter".

    how to do this by Vba?

    Anybody can help.

    Vijay

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Move Label Button with cell value

    Hi VIJAY48,

    Try the following Macros which are included in the attached sample file. Please let me know if I didn't follow your instructions.

    Part of the solution is to use a 'Forms' Command Button with the name 'Button HideOrEnter'. Included is macro RenameActiveShape(), which can be invoked by 'Right Clicking' on a Shape, and then running the macro .

    In the ThisWorkbook module:
    Please Login or Register  to view this content.
    In an ordinary code module:
    Please Login or Register  to view this content.
    Lewis

+ 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. With a move label macro, prevent label from moving onto another label
    By SocratesJC in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2014, 12:34 AM
  2. Replies: 1
    Last Post: 09-30-2013, 09:52 AM
  3. Copy cell contents to Button Label?
    By Dean England in forum Excel General
    Replies: 5
    Last Post: 04-22-2007, 09:37 AM
  4. [SOLVED] how can i move a list button into a cell
    By mikejhenderson in forum Excel General
    Replies: 0
    Last Post: 03-16-2006, 10:35 AM
  5. Label a button from a cell content
    By spyrule in forum Excel General
    Replies: 0
    Last Post: 07-22-2005, 10:00 AM

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