I am a newbe. I have created 4 userforms to input seminar evaluation data for each of the 4 periods. Each UF has directly coded outputs to specific cells in 8 columns. I believe I could put the identical events into a module and call it up for each UF but I don't know how to get the option button output for each UF into its own columns on the spreadsheet. Here is a part of the code for one UF:
Option Explicit
Dim r As Variant
Private Sub kcmd_enter_Click()
r = Application.WorksheetFunction.CountA(Range("a:a")) + 1
'Insert k1 Knowledge rating
Select Case True
Case obk15
Cells(r, 1) = 5
Case obk14
Cells(r, 1) = 4
Case obk13
Cells(r, 1) = 3
Case obk12
Cells(r, 1) = 2
Case obk11
Cells(r, 1) = 1
Case obk1NA
Cells(r, 1) = "na"
Case Else: Cells(r, 1) = "No Data"
End Select
'Insert k2 skill rating
Select Case True
Case obk25
Cells(r, 2) = 5
Case obk24
Cells(r, 2) = 4
Case obk23
Cells(r, 2) = 3
Case obk22
Cells(r, 2) = 2
Case obk21
Cells(r, 2) = 1
Case obk2NA
Cells(r, 2) = "na"
Case Else: Cells(r, 2) = "No Data"
End Select
'insert comment
Cells(r, 7) = tbk7CMT.Text
Unload Me
UserFormS1.Show
End Sub
Option Explicit
Dim r As Variant
Private Sub kcmd_enter_Click()
r = Application.WorksheetFunction.CountA(Range("a:a")) + 1
'Insert k1 Knowledge rating
Select Case True
Case obk15
Cells(r, 1) = 5
Case obk14
Cells(r, 1) = 4
Case obk13
Cells(r, 1) = 3
Case obk12
Cells(r, 1) = 2
Case obk11
Cells(r, 1) = 1
Case obk1NA
Cells(r, 1) = "na"
Case Else: Cells(r, 1) = "No Data"
End Select
'Insert k2 skill rating
Select Case True
Case obk25
Cells(r, 2) = 5
Case obk24
Cells(r, 2) = 4
Case obk23
Cells(r, 2) = 3
Case obk22
Cells(r, 2) = 2
Case obk21
Cells(r, 2) = 1
Case obk2NA
Cells(r, 2) = "na"
Case Else: Cells(r, 2) = "No Data"
End Select
'insert comment
Cells(r, 7) = tbk7CMT.Text
Unload Me
UserFormS1.Show
End Sub