Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA Form Problem - ggrrrrrrrr!!?

Status
Not open for further replies.
Mar 26, 2004
19
0
0
GB
Hello,

Perhaps you can help me
1.I want a form to appear when the spreadsheet is opened.

on this form is a box to enter data and a button.
2.Whats the coded needed to copy the text entered in to cell a1 of sheet1 when the button is hit, i know it goes under the click event on the button but i cant figure it out, I think I may need to dim as integer to do so.

thanks.
 
Code:
Private Sub CommandButton1_Click()
    ActiveSheet.Cells(1, 1) = TextBox1
End Sub
 
1) Load and Show the UserForm in the Workbook_Open event procedure
2) See the mndrlion's post

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
as east as that, thanks peep's - was just about to go for a fag in frustration!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top