Hello,
I have a userform that populates a worksheet. I have a cell in the worksheet that I want to look at another cell populated by the userform and then change it's value based on the value populated by the userform. Currently when I place the IF formula in the cell of the worksheet, when the info from the userform populates the worksheet, it erases the formula I had in the cell of the worksheet. Is there a way to dim the column in worksheet so the userform won't overwrite it?
My userform is very simple:
Private Sub cmdOK_Click()
ActiveWorkbook.Sheets("Intake Form").Activate
Range("A1").Select
If txtPassword = "intake" Then
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = txtDOE
ActiveCell.Offset(0, 1) = txtNumber.Value
ActiveCell.Offset(0, 2) = cboItemDescription.Value
ActiveCell.Offset(0, 4) = txtSerialNumber.Value
ActiveCell.Offset(0, 5) = txtComments.Value
Else
MsgBox "Wrong password, please try again"
End If
Range("A1").Select
End Sub
Private Sub cmdClear_Click()
Call UserForm_Initialize
End Sub
Private Sub UserForm_Initialize()
txtDOE.Value = ""
txtNumber.Value = ""
With cboItemDescription
.AddItem "Server (with all 4 parts)"
.AddItem "Server Only"
.AddItem "Cable"
End With
cboItemDescription.Value = ""
txtSerialNumber.Value = ""
txtComments.Value = ""
txtDOE.SetFocus
End Sub
I've skipped activecell.offset(0, 3) so it doesn't get populated, but the formula I have in the worksheet still gets overwritten....
I have a list of part numbers on another worksheet that I want to populate to a cell in the active worksheet when the info from Item Description box is transferred from the userform to the workheet.
Thank you for any advice!
Bookmarks