Newatprogramming
Technical User
I am setting up a form page setup. The form has a tabstrip (margin/paper). On the Tab paper I want to put a combo box to allow the user to specify either letter/legal size. I can get it to do this part, but I also want it to show in (2) text boxes the width and height of the paper size chosen. Here is what I did. I assume I am writing the second portion in the wrong procedure? Any help would be great.
Private Sub Form_Load()
cboPageSetup.AddItem "Letter"
cboPageSetup.AddItem "Legal"
End Sub
' this below part appears to do nothing
Private Sub cboPageSetup_Change()
If cboPageSetup.AddItem = "Letter" Then
txtHeight.Text = 11
txtWidth.Text = 8.5
End If
If cboPageSetup.AddItem = Legal Then
txtHeight.Text = 14
txtWidth.Text = 8.5
End If
End Sub
Private Sub Form_Load()
cboPageSetup.AddItem "Letter"
cboPageSetup.AddItem "Legal"
End Sub
' this below part appears to do nothing
Private Sub cboPageSetup_Change()
If cboPageSetup.AddItem = "Letter" Then
txtHeight.Text = 11
txtWidth.Text = 8.5
End If
If cboPageSetup.AddItem = Legal Then
txtHeight.Text = 14
txtWidth.Text = 8.5
End If
End Sub