mcfly
Board Regular
- Joined
- May 15, 2002
- Messages
- 162
Can numbers be added to an entry automatically? if I am entering DE can it add 2301 then the next time I add DE it will add 2302, in the same cell, or not. It will not always be DE, it could be BE or DJ and so on. So if it was DJ it would start over at 2301 then 2302?
I hope this is not to complicated or confusing.
Here is the code I am using to enter in my text and other stuff.
Private Sub OBCOLOR_Change()
OBCOLOR.RowSource = "Sheet2!a1:a12"
End Sub
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub OKButton_Click()
' Make sure Sheet1 is active
Sheets("Sheet1").Activate
'make sure a color is selected
If OBCOLOR.Text = "" Then
MsgBox "Enter a Color."
Exit Sub
End If
' make sure there is a request date.
If Textdate.Text = "" Then
MsgBox "Enter a Date."
Exit Sub
End If
' Make sure a name is entered
If TextNAME.Text = "" Then
MsgBox "You must enter a Design #."
Exit Sub
End If
' Determine the next empty row
nextrow = _
Application.WorksheetFunction.CountA(Range("A:A")) + 1
' Transfer the name
Cells(nextrow, 2) = TextNAME.Text
'TRANSFER THE COLOR
Cells(nextrow, 4) = OBCOLOR.Text
'TRANSFER THE DATE
Cells(nextrow, 1) = Textdate.Text
' Transfer the Garment Type
If Optionadult Then Cells(nextrow, 3) = "Adult"
If Optionyouth Then Cells(nextrow, 3) = "Youth"
If Optiontotal Then Cells(nextrow, 3) = "Total"
' Clear the controls for the next entry
TextNAME.Text = ""
OBCOLOR.Text = ""
Textdate.Text = ""
Optionadult = False
Optionyouth = False
Optiontotal = False
TextNAME.SetFocus
End Sub
As you can see I'm adding the text and numbers into TEXTname as DE2301,DE2302, etc..
Thanks for any replies!!
This message was edited by mcfly on 2002-09-10 14:48
This message was edited by mcfly on 2002-09-10 15:37
I hope this is not to complicated or confusing.
Here is the code I am using to enter in my text and other stuff.
Private Sub OBCOLOR_Change()
OBCOLOR.RowSource = "Sheet2!a1:a12"
End Sub
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub OKButton_Click()
' Make sure Sheet1 is active
Sheets("Sheet1").Activate
'make sure a color is selected
If OBCOLOR.Text = "" Then
MsgBox "Enter a Color."
Exit Sub
End If
' make sure there is a request date.
If Textdate.Text = "" Then
MsgBox "Enter a Date."
Exit Sub
End If
' Make sure a name is entered
If TextNAME.Text = "" Then
MsgBox "You must enter a Design #."
Exit Sub
End If
' Determine the next empty row
nextrow = _
Application.WorksheetFunction.CountA(Range("A:A")) + 1
' Transfer the name
Cells(nextrow, 2) = TextNAME.Text
'TRANSFER THE COLOR
Cells(nextrow, 4) = OBCOLOR.Text
'TRANSFER THE DATE
Cells(nextrow, 1) = Textdate.Text
' Transfer the Garment Type
If Optionadult Then Cells(nextrow, 3) = "Adult"
If Optionyouth Then Cells(nextrow, 3) = "Youth"
If Optiontotal Then Cells(nextrow, 3) = "Total"
' Clear the controls for the next entry
TextNAME.Text = ""
OBCOLOR.Text = ""
Textdate.Text = ""
Optionadult = False
Optionyouth = False
Optiontotal = False
TextNAME.SetFocus
End Sub
As you can see I'm adding the text and numbers into TEXTname as DE2301,DE2302, etc..
Thanks for any replies!!
This message was edited by mcfly on 2002-09-10 14:48
This message was edited by mcfly on 2002-09-10 15:37