View Full Version : VBA Form that uses data from a worksheet
tehaen
03-05-2013, 03:25 AM
Hi, I have done customer order form in Excel worksheet and added a 'Submit' button. In VBA I have created a form that will appear when customer clicks Submit and would contain the data from the worksheet. For example if there's a customer's first name and surname on the worksheet, I want it to appear on the confirmation form, so he can print it. I have attached a photo, so you know what I'm talking about.
I can't figure out the code, so if anyone knows how to do it and would give me the code, I would be very grateful. Thanks in advance
Greetings tehean,
Firstly, please let me welcome you to vbaexpress; my first and 'fav' site; and for good reason - the people here!
Mind you, I am a member of several sites, and there are certainly great folks at other sites. I just have an allegiance to vbax; there are folks here who will go well out of their way for someone in a code 'jamb'.
Anyways, I am sure you will be happy you joined, and hope it didn't take you as long as it did me (I 'lurked' for quite some time before joining.).
In reference to your issue - please post a workbook. Preferably in .xls format, as there are members who do not have 2007+ and your issue resolved, may help them as well.
As to posting a wb; this is wayyy better, as posting a picture may be 'pretty', but it really means that anyone wanting to help, must first take a blind stab at what you have designed. I hope that makes sense.
Mark
Hello Tehaen,
You need the TextBox Control and its ControlSource property.
Did you know that when printing a UserForm that it looks as if you printed a screenshot of the UserForm?
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.