ForumMember
Board Regular
- Joined
- Sep 10, 2011
- Messages
- 57
Hi all,
What I would like to do is have 2 fields (cbo1 & cbo2) in my Userform (Userform1) populate 2 cells (a12 & c40) in a seperate workbook (c:filepath/filename) when I click submit.
Now, I would like this option to execute only if my checkbox is executed:
Could anyone provide the code and indicate where it would sit in my Submit Button Code?
Many thanks in advance!
What I would like to do is have 2 fields (cbo1 & cbo2) in my Userform (Userform1) populate 2 cells (a12 & c40) in a seperate workbook (c:filepath/filename) when I click submit.
Now, I would like this option to execute only if my checkbox is executed:
Code:
Private Sub ChkCorrection_Click()
Workbooks.Open FileName:= _
"c:IssueLog.xls"
Windows("Real.xlsm").Activate
End Sub
Code:
Private Sub cmdSubmit_Click()
ActiveWorkbook.Sheets("Issue Log").Activate
Range("A1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = txtDate.Value
ActiveCell.Offset(0, 1) = txtTime.Value
ActiveCell.Offset(0, 2) = cboOperator.Value
Unload Me
Application.Quit
End Sub
Could anyone provide the code and indicate where it would sit in my Submit Button Code?
Many thanks in advance!