+ Reply to Thread
Results 1 to 15 of 15

Inventory Macro Needed

  1. #1
    Registered User
    Join Date
    05-08-2012
    Location
    Missouri, USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Inventory Macro Needed

    Attached is excel file with full explanation, but the gist of what I need is composed of the following :

    I have 3 Sheets(Sheet1, Sheet2, Sheet3)

    Sheet 1 and Sheet 2 have inventory data

    Occasionaly I want to grab data from Sheets 1 & 2 and add them to a form that I created on Sheet 3

    I want to do this with buttons (example : click "select" button to add that particular item to the form) and them click another button to copy all contents across all of the sheets to the third sheet

    So suppose I select 5 Items from sheet 1, and 2 from sheet 2, I need the script to know that there are 7 total items, and lay them out accordingly across say "E10-E17" with their corresponding data, ex.

    E1 : Item1, Data, Data
    E2 : Item2, Data, Data
    E3 : Item3, Data, Data
    E4 : Item4(Sheet2), Data, Data
    and so on....

    Any help would be GREATLY appreciated. Thanks ahead of time :0)
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Inventory Macro Needed

    Hello ace2go,

    Welcome to the Forum!

    I made a few changes to your original layout. There is a single button for each "Row" that will enter all the data selected on all the sheets. The selections are now made using Check Boxes. This gives the user a good visual indicator of the choices made. A command button does not. The macro below is the one called by the "Enter" buttons.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Inventory Macro Needed

    @ Leith Ross,

    Hi Leith, I like your idea of replacing "Buttons" with "CheckBoxes" and your motivation for doing so. The only thing is that I cannot get your WorkBook to do what it is supposed to. Could it have something to do with Excel 2007 that I am running.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Inventory Macro Needed

    Hello Winon,

    Are there any error messages?

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Inventory Macro Needed

    @ Leith,

    No error messages. All i got after I downloaded the Wb and on opening it was something like "External data updates have been disabled".

    Maybe I must try again quickly!

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Inventory Macro Needed

    Hello Leith,

    I have just downlowded it again, it opened up with no errors, but nothing is working? I have cleared all the Checkboxes - Nothing. Checked a few CheckBoxes - Nothing. Ran the Macro, which did Run - Nothing. I have exited Excel and opened the Wb again. Still - Nothing LOL!

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Inventory Macro Needed

    Hello Winon,

    I assume you have macros enabled. The code doesn't contain anything that is not recognized by 2007 and should run.

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Inventory Macro Needed

    Hello Winon,

    I just thought of something. I used the English code names for the sheets which is "Sheet". You will probably need to use your languages default code names. I don't remember what yours are but in Dutch it is "Blad".

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Inventory Macro Needed

    @ Leith Ross,

    Exactly what I say as well. Never ever had a problem with your Coding. As a last resort I shall no completely go off line, shut down the system, and try again a little later. Need some shut eye for an hour or so, as I am up since 2:30 this morning. Thank you for all your help.

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Inventory Macro Needed

    Hello Winon,

    You're welcome. Have a good power nap.

  11. #11
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Inventory Macro Needed

    Hello Leith,

    In Dutch it is "BLad", in Afrikaans it is "Bladsy". But no, I am on Eglish all the way using same as you, which is "Sheet"

    I shall keep you posted. Thanks once again. Cheers for now!

  12. #12
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Inventory Macro Needed

    Hello Winon,

    Did you check "Sheet 3" after you ran the macro to see if the entries were transferred?

  13. #13
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Inventory Macro Needed

    Hello Leith,

    I did check Sheet 3, and never actually saw that your Code in fact appended the Data on Sheet 3 as it should. What sleepy eyes told me is that it is not working, because I did not delete the actual comments from the first four lines or so, where it stated "Data should go here, and here, etc & etc". My sincere apologies for that.

    So in short, your code works fine except that it does not clear the Checkboxes, and that causes duplications. I have tried to "Fix" it, but cannot get it to clear the CheckBoxes, on Sheets 1 & 2 after Sheet 3 had been up-dated.

    I have got the program running in "Compatability Mode", and all works well, but not the clearing of the CheckBoxes,
    even if I save the file as Excel 2007.xlsm.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  14. #14
    Registered User
    Join Date
    05-08-2012
    Location
    Missouri, USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Inventory Macro Needed

    InventoryLaptopsverb.xlsmThe script worked great for the workbook that you submitted, but when I tried to alter it, it says "error 424, object required"

    I also wanted to know if there was a way to make the data run into a second form sheet after it hits so many fields going down, example - I add 20 items to the form and
    the next 20 cascade onto the next form worksheet.

    I also wanted to get rid of the checkboxes being checked after executing...

    THANK YOU for all of your help, I cannot believe you accomplished all that I asked before with the compiled code you submitted before! I wish I had descriptions about each section of code so I understand how it does what it does :0)
    Last edited by ace2go; 05-09-2012 at 09:52 AM.

  15. #15
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Inventory Macro Needed

    Hi guys,

    Am I being ignored here like a stop street? Where does InventoryLaptopsverb.xlsm all of a sudden "Pop up" from?

    I thought we are working on Inventory Form ver 1a.xls‎

+ 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