?I'm doing a vba foodpanda platform, how can I auto-fill the information for the check-out form?

lemon_fish

New Member
Joined
Apr 5, 2022
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
First, the customer will login through the login userform.
1649184203005.png

Then, they can start ordering the food, afterthat, it comes to the check out form.
I don't know how to auto-fill Member ID, Phone no., name, address and current member points from the customer sheet.
* Member ID=Ref_ID/ Name = User_Name
2.jpg

3.jpg

Can anyone save me? ??????? Thank you very much?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: ?I'm doing a vba foodpanda platform, how can I auto-fill the information for the check-out form? - OzGrid Free Excel/VBA Help Forum
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Here is a simple sample of code you could use to fill the fields on the Check out form:
VBA Code:
Option Explicit

Sub Main()
  ' here you should have figured out the row in the Members worksheet that applies to the logged in member
  Load CheckoutForm
  With CheckoutForm
    .tbxMemberID = Sheets("Members").Cells(CurrentMemberRow, 1).Value
    .tbxName = Sheets("Members").Cells(CurrentMemberRow, 2).Value
  ' and so on changing the column number for each of the values you wish to fill on the form
  End With
  CheckoutForm.Show
End Sub

Your Check out Userform should have Textbox controls for each data field. I have named a couple as "tbxMemberID" and "tbxName". After you get the information from the Login form you should figure the row in you Members worksheet that represents the logged in Member. At that point you should load the check out form "CheckoutForm Load", then copy the proper data items from the row for the member to the proper textbox control. When all items are copied to the form Show the form "CheckoutForm Show".

Once you are done with the data on the form (you have clicked the Add Item or Pay buttons), you can hide the form CheckoutForm.Hide, process the data then unload the form Unload CheckoutForm.

Ask if you need more help understanding this.
 
Upvote 0

Forum statistics

Threads
1,214,659
Messages
6,120,783
Members
448,992
Latest member
prabhuk279

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