combobox/textbox/userform/other question

  • Thread starter Thread starter RPIJG
  • Start date Start date
R

RPIJG

I am using this code...




Code
-------------------

Private Sub NameBox_DropButtonClick()
Dim i As Integer, ii As Integer

With NameBox
If .ListIndex >= 0 Then
For ii = 1 To 16
Controls("TextBox" & ii).Value = Format(Cells(Rng(.ListIndex + 1).Row, ii + 1), "00000")
Next
End If
End With
End Sub

-------------------




I have the formatting set for 5 numbers and if not to add zero'
however at TextBox14 I have a number that I only want 4 for. Is ther
anyway I can modify what I have above so that only TextBox14 is allowe
to have 4 and the rest are forced to 5
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top