Modify displayed data in multi-use Userform

rcmodelr

New Member
Joined
Aug 25, 2005
Messages
13
Currently trying to improve an Excel app I've written for use at work. As-is, user runs the app activated from the plant production schedule, enters the production date, clicks "Continue" and the app goes through the production schedule, finds the needed data for each production line's paperwork, then the user has to create the Inbound number in SAP and place the correct Inbound number in each line's worksheet before printing the paperwork.

I'm trying to cut down on errors by along with setting up the line worksheets, but also updating the individual production line data fields in the userform, leaving the userform open and visible for user to copy the P.O. Number from the userform, paste it into SAP to create the Inbound, then key in the SAP created Inbound Delivery number into the Inbound Number field on the userform, then be able to click the userform "Complete" button and have it automatically place the Inbound Delivery number into the production line worksheet with no risk of the individual user accidentally changing the wrong areas of the production line worksheet resulting in wrongly formatted output getting printed for the production line.

I've been unable to get the userform textbox entries to change and have found nothing telling me how to do it, but I've used other apps with such update/multi-use userforms used, so I know it's possible to do.
Capture.JPG
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
click the userform "Complete" button and have it automatically place the Inbound Delivery number into the production line worksheet
Am I mistaken thinking you're asking for assistance with the "Complete" button code that you're not showing us?
 
Upvote 0
No, I have it so the "Continue" button works on the individual worksheets as intended, but last time I wrote such an app was between 2008 and 2010. I'm now unable to remember how to get, in this case, the individual production line's P.O. Number, Product Number, Description and other listed data to fill the userform fields so the user then could create the needed Inbound Delivery numbers for each product being manufactured, enter the Inbound Delivery number into the line's "Inbound Number" field on the userform.

After the user gets the needed Inbound numbers entered into the userform, my app should then be able to insert the line's Inbound number into the correct location on each product line's worksheet when the user clicks on the "Complete" button.

The part I'm having trouble remembering how to do is getting the needed information from the production schedule workbook to show in the relevant userform fields.
 
Upvote 0
Okay, and at the point when you would click the "Continue" button, what does your userform have that would allow you to determine what row any of those P.O. Number, Product Number, etc. are in ?
 
Upvote 0
The only data entered before clicking "Continue" is the production date when setting up paperwork for the midnight production date change or the production date and the P.O. Number for the affected line/lines when there is a production change during or between shifts.

When the user clicks "Continue" the app then searches the production schedule for the needed production date and if entered, the needed P.O. Number and then copies the needed data from the production schedule into the needed locations on the line's paperwork worksheet, and at the same time it should import the product number, description, quantity and other info from the production schedule into the relevant fields in the userform.

At that time, it should allow the user to create the job Inbound Delivery Number into the Inbound field for that line on the userform and when the "Complete" button is clicked it should then insert the Inbound Delivery Number into the needed location of the relevant line's paperwork worksheet.

I am, however, starting to get it figured out and have it going this far (in attached image), but now need to have it also allow the cases per HU to be changed by user to a number resulting in all full quantity labels since SAP works too stupidly to save and print the partial quantity label at the end of the run and instead elects to print the partial quantity label anywhere from at the start of the job to less than half-way through the job.

Also, in such userforms, is there any way to get it so each duplicate field (in this case most of them, 5 P.O. Numbers, 5 Product Numbers, descriptions, and such handled by array instead of having to specify each individual userform field individually?
Capture.JPG
 
Upvote 0
I'm 100% sure that you, sitting looking at your workbook, know exactly what you're working with.
All I see is 2 pictures of your user form.

Don't know what code you've got so far.
Don't know the layout of the worksheet you're dealing with.
Don't know the names of the 30 odd text boxes on the user form
But do know you enter the Production Date

So, going by that, and assuming that the worksheet has a column of Production Dates,
you can filter the sheet based on that production date and then loop the visible rows to get the data,
or, use the range.find method along with .findnext to establish the rows needed to get data from.

Sorry I'm not able to be much more specific than that.
Hopefully another member will chime in to help you out.

Good luck with your project.
 
Upvote 0
The last supplied screenshot was after I just entered the production date and clicked "Continue". The app then went through the production schedule to get the data displayed with the fields for Bagger 2 remaining blank since Bagger 2 was not operating on that day. For the UserForm, the P.O. number fields are labeled as "Line1", "Line2", etc. to "Line5" When I was asking about using arrays for fields, I meant such as for the P.O. Numbers in this UserForm, it would greatly reduce the coding if I could simply have the coding loop through the Userform P.O. Number fields as an array loop with the number following the word "Line" in parentheses like "Line(1)" instead of "Line1" so the individual P.O. Numbers would end up stored as an array named Line with 5 separate elements to the array {Line(1 - 5)} instead of needing a separate line of code to handle each separate UserForm field name for the P.O. Numbers
 
Upvote 0
Is there any chance of you posting the code that ran when you clicked "Continue" ?
 
Upvote 0

Forum statistics

Threads
1,214,899
Messages
6,122,155
Members
449,068
Latest member
shiz11713

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top