Closed Thread
Results 1 to 15 of 15

VBA Ordering User form for Purchase Ordering.

  1. #1
    Registered User
    Join Date
    02-15-2012
    Location
    London, United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    69

    Thumbs up VBA Ordering User form for Purchase Ordering.

    Hi All,

    I've attached a PO request form which has a button listed above to automatically generate a purchase order request ( Well trying to accomplish this )

    As you can see, when click on the "Generate Purchase Order Request" button, a user-form pop-up prompting a site,Cost Centre & WBS Code. What i want to achieve is, the site is pulling the sheet tabs listed. Once a tab is selected in the "site drop down" a cost centre name can be then selected (Materials,Rechargeable,Animals . When selecting this it will populate the WBS code information shown below. Then once all the fields are populated, you can click continue. This will then fill out the correct cells on the request like WBS centre, and the vendor name would be updated from the supplier which is being ordered from.

    I hope once achieving this and clicking confirm will allow the Tesco's, Asda, Sainsburys information to be listed and quantity's be added to the order request template.

    The aim of this project is to minimise human error with product codes/ descriptions/ and which "Farm" the order is based to create a new PO Request.

    Once adding the products, i hope to be able to click finish order. It will fully populate the cells required in the PO request form, then to have a button to which i can save as, and it will create the PO request without the module information / button.

    I appropriate any help with this, I'm willing to learn as much as possible.

    Please find attached the document, and the basic of what I've added. Looking to be pointed in the right direction.

    I am looking for additional ideas, like possibly a date drop down calendar to select the date of delivery and another for Date raised
    Attached Files Attached Files
    Last edited by caf20012; 01-03-2014 at 08:50 AM. Reason: Update

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: VBA Ordering User form for Purchase Ordering.

    The sample shows static supplies from each vendor. Will that be the case? Or could the supplies all be different?

    And is the same true for cost centre?
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: VBA Ordering User form for Purchase Ordering.

    Here is an initial cut that just shows the forms and allows selection, but no updating. Is this where you are going? BTW, what is Product Category.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-15-2012
    Location
    London, United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: VBA Ordering User form for Purchase Ordering.

    Hi Bob,

    This is an excellent start! I greatly appreciate your help. What I'm requiring now is once selecting the farm, The WBS row will update so all products / WBS selected, product codes and unit prices update on the excel sheet depending on the selection made. Possibly a button to select a date for delivery that populates in the delivery date cell?


    Update**
    Once again thank you for the progression so far, I'll'll now work through the coding added to understand what input has been made. A button as well on the order form worksheet that saves as a new document but without the macro added. As well when selecting a supplier, It would populate the vendor name field.

    The Asda product doesn't list like the other suppliers, how would i fix this?

    Product Category can be removed.
    Last edited by caf20012; 01-03-2014 at 11:27 AM. Reason: Update

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: VBA Ordering User form for Purchase Ordering.

    OK, much as I suspected, just wanted to check progress to date. For the saving, I would suggest we just copy the PO form off to a new workbook, save that, and then clear the one in this workbook.

    BTW, Tinbendr asked about the number of suppliers. Will it always be the static 3, or could it flex up/down?

    I'm just off to the movies now, I will pick up on it on my return, and/or tomorrow morning.

  6. #6
    Registered User
    Join Date
    02-15-2012
    Location
    London, United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: VBA Ordering User form for Purchase Ordering.

    For this example I've used 3, potentially there could be 10 suppliers in the near future. Once the fundamental information is done, I'll extend the supplier. It's basically so when I'm away. A user friendly program is in place for whoever is covering my position.

    Any ideas you might have please use them. The more use friendly and less manual input. The less errors.

    Thanks again for the prompt response.

    Update**

    Products for suppliers and WBS codes won't be static. I'll increase them with potentially more. I used name manager previously to set the field
    Last edited by caf20012; 01-03-2014 at 01:24 PM.

  7. #7
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: VBA Ordering User form for Purchase Ordering.

    I've updated the app, and I have made quite a few changes, so best to point them out.
    • extended the products on the PO form to 20 items
    • separated the launch button and the PO Form onto separate sheets, easier coding
    • removed a lot of the merged cells as they were becoming a coding hindrance
    • changed it to cater for more than 3 suppliers (it assumes that the layout per supplier is identical - I added a Wessex Foods site and Waitrose to that list to test)
    • added posting items to PO Form
    • added saving the PO Form
    • added a Cancel Order button to the product selection form
    • I removed all of your defined names, they weren't used

    I was also thinking that you should have a customer table, so that detail could also be automatically posted to the PO Form.

    Anyway, take a look and see how close this is.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-15-2012
    Location
    London, United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: VBA Ordering User form for Purchase Ordering.

    Hi,


    Private Sub cmdFinish_Click() give me an error when finishing the order. "Complie Error: Invalid Qualifer"

    Do you know, if i finish the order, it fills the vendor depending on the products orders for the farm?

  9. #9
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: VBA Ordering User form for Purchase Ordering.

    This should fix it
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-15-2012
    Location
    London, United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: VBA Ordering User form for Purchase Ordering.

    Hi Bob,

    Seems to be working great, Any other productive ideas you can think of adding to this?

  11. #11
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: VBA Ordering User form for Purchase Ordering.

    I mentioned in #7 that I would think you should have a customer details table to pre-load that.

  12. #12
    Registered User
    Join Date
    02-15-2012
    Location
    London, United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: VBA Ordering User form for Purchase Ordering.

    How does the layout of the page affect the suppliers list? does it have to stay as the same template?

  13. #13
    Registered User
    Join Date
    02-15-2012
    Location
    London, United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    69

    Thumbs up Re: VBA Ordering User form for Purchase Ordering.

    Hi,

    I've provided an update of the basis of what more I require.

    Summary:

    1. I've added a PO request sheet of the correct format I require "PO Request" the order form template. I'm aware that it caused issues because of the merged cells. Do you know if it could pull the data on "order form" sheet directly to the "PO Request" Sheet in the correct areas?

    2. I've listed on Dean city farm an address which I would hopefully like to set-up Pulling from the site form. Once a farm cost centre is selected. It would put in the order form "delivery address cell


    3. Delivery date, I've added a delivery date drop down which I hope could be used to populate the delivery date cell.

    4.Vendor address, Depending on the products ordered from 1 supplier. The vendor cells on the order form could be populated depending on the data located next to it.

    Kind Regards,

    Caf20012






    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    02-15-2012
    Location
    London, United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: VBA Ordering User form for Purchase Ordering.

    I've managed to add a textbox to allow date to be input and pulls to the excel worksheet.

    wsOrderForm.Range("J11") = txtdate.Text

    How do i make the "txtdate" textbox only validate date format?

  15. #15
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: VBA Ordering User form for Purchase Ordering.

    Closed at request of OP to post in Commercial Services.

    Thread Closed.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 10-30-2012, 02:05 AM
  2. re ordering rows
    By Mattance in forum Excel General
    Replies: 6
    Last Post: 07-13-2009, 02:13 AM
  3. Ordering worksheets by name
    By oddcarout in forum Excel General
    Replies: 2
    Last Post: 06-03-2009, 01:15 PM
  4. ordering
    By pytelium in forum Excel General
    Replies: 3
    Last Post: 03-13-2006, 07:25 PM
  5. Need help on formulating ordering
    By Angela in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-07-2005, 04:05 PM

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