Hello,
I am trying to create a form that allows users to enter a request and then it will populate the data into the worksheet. The issue is that I have data in column A that needs to stay there, so I need the data to go to the next cell in B. For example:
[TABLE="width: 500, align: center"]
<tbody>[TR]
[TD]RFA ID[/TD]
[TD]Requested By[/TD]
[TD]Date[/TD]
[TD]Description[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John[/TD]
[TD]12/13[/TD]
[TD]yada yada[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In the table above I want the data from my user form to go to Columns labeled - Requested By, Date, & Description. Then for the next user to use the form, I would like it to enter their information into row 2, etc. Here is the code I have now, but it requires the cell to be selected:
Any help on this matter would be much appreciated!!
Thanks,
Travis
I am trying to create a form that allows users to enter a request and then it will populate the data into the worksheet. The issue is that I have data in column A that needs to stay there, so I need the data to go to the next cell in B. For example:
[TABLE="width: 500, align: center"]
<tbody>[TR]
[TD]RFA ID[/TD]
[TD]Requested By[/TD]
[TD]Date[/TD]
[TD]Description[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John[/TD]
[TD]12/13[/TD]
[TD]yada yada[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In the table above I want the data from my user form to go to Columns labeled - Requested By, Date, & Description. Then for the next user to use the form, I would like it to enter their information into row 2, etc. Here is the code I have now, but it requires the cell to be selected:
Code:
Private Sub cmdSubmit_Click()
If txtName.Value = "" Then
If MsgBox("Please enter name or type Anonymous") Then
Exit Sub
End If
End If
ActiveCell = txtName.Value
ActiveCell.Offset(0, 1) = DT1.Value
ActiveCell.Offset(0, 2) = txtDesc.Value
ActiveCell.Offset(1, 0).Select
Call resetForm
End Sub
Sub resetForm()
txtName.Value = ""
txtDesc.Value = ""
formRFA.txtName.SetFocus
End Sub
Any help on this matter would be much appreciated!!
Thanks,
Travis