View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Shauna Koppang Shauna Koppang is offline
external usenet poster
 
Posts: 24
Default TextBox Coding Help

HI Tom,

Thanks SO much for your reply. In the interim I got just about as far
as you described. I can get it to display when I run it but not when I
File menu, New and create a new workbook based on my template.

Here is the code so far:

In Module 1:
Sub ShowForm()
UserForm1.Show
End Sub

In UserForm:
Private Sub CommandButton1_Click()

'Insert text from textboxes into cells
With ActiveDocument
Worksheets("Sheet1").Range("A1") = TextBox1.Text
Worksheets("Sheet1").Range("A3") = TextBox2.Text

End With

UserForm1.Hide

End Sub
It works and enters the values into the cells but I can't get it to
launch the userform when I File menu, New, choose the templates and
click OK.

Any hints?

THANKS SO MUCH!!! Next I have to tackle combo boxes as I have to create
a purchase order workbook! Yikes.

Shauna


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!