+ Reply to Thread
Results 1 to 9 of 9

Automatic button after data entry

  1. #1
    Registered User
    Join Date
    07-12-2010
    Location
    Bloomington, USA
    MS-Off Ver
    Excel 2003
    Posts
    20

    Automatic button after data entry

    I have an input form in excel. What i cant figure out is how to automatically add a button to end of each row when i add the data. What i mean by that is that i have made this button with can be used to run a macro, i want that button to be copied and changed to run for this row each time i create a new row.

    Example

    I have Data from A3 to H3 and a button in I3 which when clicked cuts the A3 to H3 and moves to a different tab.

    When i add data to A4 to H4 an automatic button should be created that would move data from A4 to H4 to a different tab when clicked.

    I hope this is possible.

    Thanks in advance.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Automatic button after data entry

    Seems a strange way of working.Why are you moving the data?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-12-2010
    Location
    Bloomington, USA
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Automatic button after data entry

    Quote Originally Posted by royUK View Post
    Seems a strange way of working.Why are you moving the data?
    Its like i am creating a excel file, so that i can move and create a pdf of all orders which are have enough inventory to be completed. so, if the order has enough inventory to be completed then it can be completed then i can click a button which would decrease my inventory and move the order to a permanent database while creating a delivery order.

    I hope this helps... i am attaching my document which i am working on...

    It would be great if you can look into it and give me suggestions on how to continue..

    Thanks..
    Attached Files Attached Files
    Last edited by excel199; 07-13-2010 at 02:53 AM.

  4. #4
    Registered User
    Join Date
    07-12-2010
    Location
    Bloomington, USA
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Automatic button after data entry

    I have attached an excel 2007 file which you can check to understand what i am doing to comment on any other method you believe is better.


    Thanks

  5. #5
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Automatic button after data entry

    Hi excel199;

    Here's 2 subs.
    Create_Button() checks to see if there is already a button in the row, and if not creates one.

    It assigns the "Button_Click" macro to the button.
    Button_Click() determines what row it is on, so you can then call whatever macro you want with the row. That way you don't have to assign a different macro to each button.

    Just put "Create_Button Target" into the Worksheet_Change() event wherever it's most useful to you.
    Please Login or Register  to view this content.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  6. #6
    Registered User
    Join Date
    07-12-2010
    Location
    Bloomington, USA
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Automatic button after data entry

    Thanks... i think that is a good enough approach

  7. #7
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Automatic button after data entry

    Be sure and mark the thread solved, and rate the answer if you liked it.

  8. #8
    Registered User
    Join Date
    07-12-2010
    Location
    Bloomington, USA
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Automatic button after data entry

    I can not figure out how to mark the thing solved.

  9. #9
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Automatic button after data entry

    Quote Originally Posted by excel199 View Post
    I can not figure out how to mark the thing solved.
    It is described in the forum rules:

    10. Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

    :-)
    If you are pleased with a member's answer then use the Star icon to rate it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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