+ Reply to Thread
Results 1 to 28 of 28

Macro Buttons for Editing and Adding Inventory

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

    Macro Buttons for Editing and Adding Inventory

    I am including the current file that I have attached to this post.

    I am very new to using macros and I am trying to keep an inventory of instruments and I need some help. I found this macro and have edited to my liking as far as editing the inventory pages, however I need help developing it further and adding another macro button in order to add lines of inventory. I will try my best to explain what exactly I am looking for.

    On the current "Edit Inventory" button, it can edit inventory according to model # and will make the necessary changes in the worksheet "Inventory." However, I also have a HistoryList worksheet and I need it to input the following things to the historylist. I would like the button to do the following: I am able to insert up to 5 different items at a time. I would like to be able to have a new combobox section for the different brand names. I would like to be able to select the brand names, and then the combobox for the models would only show the select models associated with the brand name listed. I would then like to be able to insert the one of the reasons for the inventory change in the drop down menu from the "info" worksheet. I would then like each of these things to transfer over to the history list upon hitting the submit button and each of the selections besides the user and time to clear in order to be able to input once again.

    I would then like to create a second button in order to add inventory. I would like the second button to be based off of the first button in that, if the selected brand and model number that is selected for editing the inventory is not currently on the list, then it pops up a second box asking for the things I have on the inventory worksheet, being the instrument, the model, the brand, a description, and the new quantity to input...and then it pastes it to the bottom of the instrument page.

    I know this is a lot to ask for and that it may take some time, but I am at an absolute stand still with being able to develop more macro and need some help. I would love to work with someone to help me develop this inventory system.

    Thanks,

    PHIL
    Attached Files Attached Files

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Philrulesw

    Looks like you are very competent at code so Jack has a good example here at J & R Database Form...

    let us know if have any problems or it dosent suit your needs
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    Well im not very competent at writing code as I only found this macro online and have edited it to my liking. I will check out the link posted, but if anyone knows how to write the code for what im looking for that would be great help.

    Phil

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Macro Buttons for Editing and Adding Inventory

    Ok have a look and then we can adjust to suit

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil

    Welcome to the Forum!

    I've looked at your Thread, attached file and your defined requirements for well over an hour trying to get an understanding of just what your looking for.
    The example that Pike has suggested I've used many times successfully (with modification of course...to meet user needs) and perhaps it'll fit your needs...don't know yet.

    What you're suggesting is Dependant ComboBoxes...Select Brand Name which will bring up a list of Instrument Types...select an Instrument Type and it'll bring up a list of Model Numbers (or what ever sequence)

    One of the elements you speak about you've not provided
    I would like to be able to select the brand names, and then the ComboBox for the models would only show the select models associated with the brand name listed
    I'd like you to develop a worksheet that lists Brand Name, Instrument Type and Model Number (or whatever sequence you choose). I've some ideas on this...may be totally crap...who knows.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  6. #6
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    Yes, I have not made the macro button for the part that you quoted because I do not know how to read the code. The information would be provided from the inventory sheet that is already present.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil

    I would love to work with someone to help me develop this inventory system.
    Please show us what your inventory looks like (50 to 100 records...or the entire inventory if you so choose...I can work with that)...perhaps I can help.

    Can't help with what I see.

  8. #8
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    Ok, here is what I am trying to work with.
    Attached Files Attached Files

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil...I'll look at this tomorrow.

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil...sorry I didn't get a chance to look at this today...lot's of Forum Issues today. I'll create a follow up for the AM.

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil...looking at it. Lot's of Forum issues the last couple of days...haven't given up on it.

    Are Model Numbers UNIQUE to a Brand (manufacturer)?...to an Instrument TYPE?

    Further, will you ALWAYS have a Model Number?
    Last edited by jaslake; 01-31-2012 at 07:20 PM.

  12. #12
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    Sorry, I have been really busy with other stuff this week so far. The model numbers ARE UNIQUE to the brand/manufacturer, and they are also specific to the instrument type. Every instrument should ALWAYS have a model number. I believe some on the list I gave you don't have some model numbers, but that is only because I haven't been able to figure them out yet.

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil
    That's fine...I've been through about 3 or 4 iterations of this thus far. Soon I'll decide which one works best for me and send it on for your perusal.

  14. #14
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    Thank you very much.

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil
    I was two minutes from sending you a file tonight but in those two minutes I was able to break it...and it's a significant issue (crashes Excel). So, it'll be a bit. Need to do some thinking and a small bit of redesign. The sad part...don't even know if what I have suits your need. Ah well, if I can get it working I guess we'll find out. Back to you when I have something that's stable.

  16. #16
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil

    Well, did a complete redesign. Haven't been able to break this design for the last 2-3 hours. Again, not sure this is what you're looking for.

    Here's how it works:
    1. I've added a dynamic Named Range to the Info Sheet called "Brand". One CANNOT ADD to this list with the procedures. If you have a new Brand simply add it to the list in Info...sort the list if you so choose (or the sort can be built into the procedures...rather simple).
    2. Having chosen a Brand, you'll be presented with a list of Instruments that currently exits for the chosen Brand. If the Instrument you're currently processing does NOT exist for the selected Brand simply type the Instrument Name in the ComboBox. If it DOES exist, click on the Instrument Name.
    3. Having chosen an Instrument, you'll be presented with a list of Models that currently exist for that Instrument for that Brand. If the Model currently exists, simply select it. If it doesn't exist, type the new Model Number in the ComboBox.

      Play with it...let me know what you like...what you don't like. What works...what doesn't work. Let me know of issues.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    I hope that you can get it working --- I am looking forward to see what someone has done with it so far. For right now, I am still just using the basic one that I had before.

  18. #18
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil

    Did you have issues with the file attached to my post #16?

  19. #19
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    I'm sorry John - I totally did not see the second page of the post. Thank you tons, I will go ahead and take a look to see how it fits with what I am looking for. Thanks again.

  20. #20
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    I really like what I see with the document here! One thing that I have noticed in playing with it is that when you enter a NEW ITEM with the macro button, it doesn't put it into the INVENTORY list in the correct order. The INSTRUMENT, MODEL, and BRAND ORDER are mixed up in posting it to the INVENTORY list.

  21. #21
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil...I don't doubt this for a moment
    when you enter a NEW ITEM with the macro button, it doesn't put it into the INVENTORY list in the correct order
    I've had about 8 different versions (kept breaking on me...knew what I wanted to do but couldn't keep Excel alive). So, I'll look at that. Let me know of other issues. Get back to you.

  22. #22
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil
    Must've had one beer too many. This issue
    when you enter a NEW ITEM with the macro button, it doesn't put it into the INVENTORY list in the correct order
    is created by these lines of code in the "CommandButtonCapturar_Click" code.

    Change these lines of code from this
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    Let me know of issues.

  23. #23
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    Is there a reason that the macro button would not work on my mac, but when I get my laptop, it works on PC? Because I open the file on my mac and it comes up with an error reading

    " Run-time error '380':
    Could not set the RowSource property. Invalid property value."

  24. #24
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil
    Although the new version of Excel for the mac supports VBA, not all things are handled. The code I presented was developed on a mac but in Virtual Machine mode (PC mode). A Forum member who actively uses Excel for the mac would have to address this issue. Sorry.

  25. #25
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    If anyone knows how to take the most recently posted excel file in this thread and make it work on mac in .xls, can you please help make the change so it will work across both Windows and Mac?

  26. #26
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil
    There are several advanced Forum users that actively use the mac that will be able to address this new issue (I've a feeling they'll advise you it WON'T work but what do I know about VBA on the mac).
    In any event, I'd advise you to start a new Thread for this issue being sure to reference mac in your Thread title. If you do so, I'd appreciate if you'd PM me with a link to that Tread...I'd like to follow it.

  27. #27
    Registered User
    Join Date
    01-25-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro Buttons for Editing and Adding Inventory

    I appreciate all your help that you have had. I will try things on my laptop to make sure it is working in the way that I want and then I will post the new form of the excel file that you fed me and make a new thread that explains the change that we are looking for. Thanks for all of your help - and if everything that I had was running on Windows then I would be set!!!

    PHIL

  28. #28
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Buttons for Editing and Adding Inventory

    Hi Phil
    It's called VMWare Fusion (Google it). It's what I use...'course, I'm lazy and don't want to learn the mac. But, that's all my children use so I need to 'sorta accommodate them.

+ 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