+ Reply to Thread
Results 1 to 9 of 9

Is it possible to build a button to add 10 rows ontop wherever row the button located ?

  1. #1
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    Is it possible to build a button to add 10 rows ontop wherever row the button located ?

    hello guru's ,

    I would like to use this button in 1000's different places in my excel workbook,
    would love to know the best code for it,
    would be great if that'll be dynamic, so If I'll copy and relocate the button to another place - it still works.

    that'll be nice tool for much quicker work.

    appreciate the help .

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Is it possible to build a button to add 10 rows ontop wherever row the button located

    Hi,
    You could try this code and associate a keyboard shortcut to it instead of a button. Will add 10 rows above current cell.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    Re: Is it possible to build a button to add 10 rows ontop wherever row the button located

    hey, thanks for helping.
    is it 10 rows above my mouse pick'd cell ?

    how can I make the shortcut ALT+A ?
    I'm new at VBA where do I place the code to make it true for the all workbook ?

  4. #4
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Is it possible to build a button to add 10 rows ontop wherever row the button located

    It will be 10 rows above the selected cell.

    For the macro to work in all workbooks, in must be placed in your personnal workbook. See this link that explains how to do it : http://www.rondebruin.nl/win/personal.htm

    To assign a keyboard shortcut to you macro : http://office.microsoft.com/en-001/e...005202306.aspx

    Hope this helps...

  5. #5
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    Re: Is it possible to build a button to add 10 rows ontop wherever row the button located

    hi, thanks looks awesome .
    I've learned about the personal file, I rather make the code on one sheet(I.E - Template) and then copy paste everytime. pls fix me if I'm wrong - with personal file I guess that I need to do this on every computer that I'll open the file, so I lose being dynamic. and It'll be more ease on system resources if I use it on one sheet and everytime copy paste it, instead of the personal file.

    I've done the "by shortcut" macro, it works awesome, but it does something slightly not what I've intented , What the macro does is taking one cell 10 rows down, I'll like to make it so it'll take the all row 10 rows down , sorry for being not precise, I didn't knew this was possible


    edited: I see that actually it works on all sheets just after I've added this macro. which is great. I don't think personal file needed .
    Last edited by netanel99; 08-02-2013 at 09:03 PM.

  6. #6
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Is it possible to build a button to add 10 rows ontop wherever row the button located

    I've done the "by shortcut" macro, it works awesome, but it does something slightly not what I've intented , What the macro does is taking one cell 10 rows down, I'll like to make it so it'll take the all row 10 rows down , sorry for being not precise, I didn't knew this was possible
    Not sure to understand what you want.
    Can you clarify or post a file with expected result.

  7. #7
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    Re: Is it possible to build a button to add 10 rows ontop wherever row the button located

    Sure, Appreciate the help .

    10RowsDown.xlsx

  8. #8
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Is it possible to build a button to add 10 rows ontop wherever row the button located

    Hi again,
    this should work :
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    05-12-2013
    Location
    Tel Aviv, Israel
    MS-Off Ver
    Excel 2021
    Posts
    112

    Re: Is it possible to build a button to add 10 rows ontop wherever row the button located

    works like a charm. brightest solution ever.
    Thank you very much.

    thought to make 1000's buttons
    Last edited by netanel99; 08-02-2013 at 11:10 PM.

+ 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] Button Not Sized or Located Properly
    By jeff_kaufman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-12-2013, 06:12 PM
  2. How to find cell button is located in?
    By mcclanat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2011, 04:18 PM
  3. button corresponding with macro located on different sheet than data
    By buckfran in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2009, 05:01 PM
  4. does excel know in which cell a button is located?
    By Jim in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-09-2005, 02:05 PM
  5. How to build a button in excel?
    By andyd2k in forum Excel General
    Replies: 3
    Last Post: 05-15-2005, 12:39 PM

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