chipsworld
Board Regular
- Joined
- May 23, 2019
- Messages
- 164
- Office Version
- 365
Trying to pass data from a form to a sheet...getting runtime error 1004 and have no idea why...
Can someone take a look and tell me here I am going wrong?
Can someone take a look and tell me here I am going wrong?
Code:
Private Sub cmdupdate_Click()
Dim wsadd As Worksheet
Set wsadd = Sheets("Historical")
Dim Rw As Integer
Rw = Sheets("historical").Range("B:B").Find(Me.txtnam.Value, LookIn:=xlValues, LookAt:=xlPart, SearchDirection:=xlPrevious).Row
With wsadd
Sheets("historical").Range("W", Rw).Value = Me.cmbstate.Value
Sheets("historical").Range("X", Rw).Value = Me.txtlstfor.Value
Sheets("historical").Range("T", Rw).Value = Me.txtunit.Value
Sheets("historical").Range("V", Rw).Value = Me.cmbrefrad.Value
Sheets("historical").Range("U", Rw).Value = Me.txtuic.Value
End With
End Sub