Hi, I'm using the following code with one of my projects, perhaps it's useful to you:
Create your UserForm, and design it appropriately. My example is using TextBoxes. Create a "Submit" button on the form. Right-click the Submit button, and choose "view code". You should be presented with the framework looking like this:<span style="font-family:verdana">
Private Sub ButtonName_Click()
The code you place inside this Sub will be executed when the user clicks the Submit button. This is where you want to do error-checking (did they enter good values?) and, finally, put the values where you want them.
Here's sample code to take three text boxes, and place the values on a workbook, then close the userform.
Private Sub Submit_Click()
.Range("A1").Value = UserForm.A1TextBox.Value
.Range("B1").Value = UserForm.B1TextBox.Value
.Range("C1").Value = UserForm.C1TextBox.Value
In order to start the whole process, your code must display the form. To do this, use:<span style="font-family:verdana">UserForm.Show</span>
Remember, when you're designing and building your graphical UserForm, it's always helpful to name the elements appropriately. For example, don't leave your Submit button called "Button2", but rather, open the element's Properties, and rename it to SubmitButton.
<input style="border:1px solid;" maxLength=256 size=15 name=q value=""> <input type=submit value="Search" name=btnG></form> This message was edited by OdinsDream on 2002-08-19 10:50 This message was edited by OdinsDream on 2002-08-19 10:51