+ Reply to Thread
Results 1 to 6 of 6

How to move on object via macros on specific place in xls sheet

  1. #1
    Forum Contributor
    Join Date
    01-20-2011
    Location
    liverpool
    MS-Off Ver
    Excel 2016
    Posts
    198

    How to move on object via macros on specific place in xls sheet

    Hello,
    I have an xls with 2 macros buttons. Those buttons have proporty "Do not move or size with cell".
    However when I am applying advanced filter, delete lines show all data-both buttons are going to the line that was on top before applying "show all data"
    So I am looking for a way to put in the macros some lines that will send macros button on the top of the sheet again (for example row1, column4 and row1, column 6)
    Thanks in advance.
    Erkamu

  2. #2
    Forum Contributor
    Join Date
    01-20-2011
    Location
    liverpool
    MS-Off Ver
    Excel 2016
    Posts
    198

    Re: How to move on object via macros on specific place in xls sheet

    Guys,
    It can't be so difficult.
    I am in a hurry. Please help me.
    Erkamu

  3. #3
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: How to move on object via macros on specific place in xls sheet

    You need to use the "LEFT" and "TOP" properties of the command button.
    These are in "number of pixels from the left / top".

    For example :
    Please Login or Register  to view this content.
    Puts a command button in cell D1, with "standard" sized columns and rows.

    Please click the * below if this helps

  4. #4
    Forum Contributor
    Join Date
    01-20-2011
    Location
    liverpool
    MS-Off Ver
    Excel 2016
    Posts
    198

    Re: How to move on object via macros on specific place in xls sheet

    Hi,
    I tried what you are sugesting. Added those 2 lines in the macros but it ends up with Run-time error 424 Object required

  5. #5
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: How to move on object via macros on specific place in xls sheet

    You probably use Form Buttons instead of ActiveX Buttons.

    Replace your form buttons with activex ones. And don't ever use form buttons ever again

    If you actually DO use activex buttons, then make sure you refer to the correct button (CommandButton1 / CommandButton2 / CommandButton3 etc...)
    Last edited by JasperD; 06-19-2013 at 08:04 AM.
    Please click the * below if this helps

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to move on object via macros on specific place in xls sheet

    Quote Originally Posted by JasperD View Post
    Replace your form buttons with activex ones. And don't ever use form buttons ever again
    my advice would be the exact opposite-forms buttons are more stable
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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