MatheMagician33
New Member
- Joined
- Aug 31, 2015
- Messages
- 4
I created a Userform that prompts the user to enter a proposers name and which disciplines they are proposing on. Each discipline has its own tab(worksheet) and each discipline has its own checkbox in the Userform. I want the userform to add the proposer to each discipline tab that has been checked. Here is what I have so far:
Sub NewProposer_Initialize()
'Empty txtboxProName
txtboxProName.Value = ""
'Uncheck DataCheckBoxes
chbAll.Value = False
chbAaPl.Value = False
chbEnaD.Value = False
chbPraF.Value = False
chbLand.Value = False
chbEnvA.Value = False
chbEaFA.Value = False
chbPFaS.Value = False
chbDGaM.Value = False
'Set Focus on txtboxProName
txtboxProName.SetFocus
End Sub
Sub cmdCancel_Click()
'Cancel
Unload Me
End Sub
Sub cmdCreate_Click()
If chbAll.Value = True Then
Worksheets("Sheet13").Range("A1").End(xlDown).Offset(1).Row 1 = txtboxProName.Value
End If
'copy the data to the database
'Worksheets("Sheet5").Range("A1").End(xlDown).Row 1 = txtboxProName.Value
'ElseIf chbAaPl = True Then Worksheets("Results" ^ "General" ^ "Analysis & Planning").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbEnaD = True Then Worksheets("Results" ^ "General" ^ "Engineering & Design").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbPraF = True Then Worksheets("Results" ^ "General" ^ "Process & Facilitation").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbLand = True Then Worksheets("Results" ^ "General" ^ "Land Use").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbEnvA = True Then Worksheets("Results" ^ "General" ^ "Environmental Analysis").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbEaFA = True Then Worksheets("Results" ^ "General" ^ "Economic & Financial Analysis").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbPFaS = True Then Worksheets("Results" ^ "General" ^ "Public Facilities & Services").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbDGaM = True Then Worksheets("Results" ^ "General" ^ "Data-Mapping-GIS").Range("A1").Row 1 = txtboxProName.Value
'Else: Me.Caption = "No Disciplines have been selected"
End Sub
Sub cmdClear_Click()
'Clear New Proposer Dialog
Call NewProposer_Initialize
End Sub
Sub NewProposer_Click()
'Show Userform
NewProposer.Show
End Sub
can anyone help?
Sub NewProposer_Initialize()
'Empty txtboxProName
txtboxProName.Value = ""
'Uncheck DataCheckBoxes
chbAll.Value = False
chbAaPl.Value = False
chbEnaD.Value = False
chbPraF.Value = False
chbLand.Value = False
chbEnvA.Value = False
chbEaFA.Value = False
chbPFaS.Value = False
chbDGaM.Value = False
'Set Focus on txtboxProName
txtboxProName.SetFocus
End Sub
Sub cmdCancel_Click()
'Cancel
Unload Me
End Sub
Sub cmdCreate_Click()
If chbAll.Value = True Then
Worksheets("Sheet13").Range("A1").End(xlDown).Offset(1).Row 1 = txtboxProName.Value
End If
'copy the data to the database
'Worksheets("Sheet5").Range("A1").End(xlDown).Row 1 = txtboxProName.Value
'ElseIf chbAaPl = True Then Worksheets("Results" ^ "General" ^ "Analysis & Planning").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbEnaD = True Then Worksheets("Results" ^ "General" ^ "Engineering & Design").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbPraF = True Then Worksheets("Results" ^ "General" ^ "Process & Facilitation").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbLand = True Then Worksheets("Results" ^ "General" ^ "Land Use").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbEnvA = True Then Worksheets("Results" ^ "General" ^ "Environmental Analysis").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbEaFA = True Then Worksheets("Results" ^ "General" ^ "Economic & Financial Analysis").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbPFaS = True Then Worksheets("Results" ^ "General" ^ "Public Facilities & Services").Range("A1").Row 1 = txtboxProName.Value
'ElseIf chbDGaM = True Then Worksheets("Results" ^ "General" ^ "Data-Mapping-GIS").Range("A1").Row 1 = txtboxProName.Value
'Else: Me.Caption = "No Disciplines have been selected"
End Sub
Sub cmdClear_Click()
'Clear New Proposer Dialog
Call NewProposer_Initialize
End Sub
Sub NewProposer_Click()
'Show Userform
NewProposer.Show
End Sub
can anyone help?