Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
<a href="http://img232.imageshack.us/my.php?image=userform6mz.jpg"
target="_blank"<img src="http://img232.imageshack.us/img232/5901/userform6mz.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /</a I have a macro associated to the userform (pictured above) Private Sub cmdAlt_Click() Dim HFC As String Dim Index As Variant Dim nextrow As Long HFC = Me.txtHFC1.Value nextrow = Range("A65536").Row + 1 Index = Application.Match(HFC, Range("Sheet1!A1:A65536"), 0) If IsError(Index) Then MsgBox "Not Found, check HFC MAC and try again" End If Set Index.Offset(0, 3).Value = Me.txtUser.Value Set Index.Offset(0, 4).Value = Me.txtStat2.Value Me.txtHFC1.Value = "" Me.txtUser.Value = "" Me.txtStat2.Value = "" Me.txtHFC1.SetFocus End Sub the goal with this one is to use the first text box (HFC MAC ID) to be searched in the A column, once it is found then on the same row, 3 columns over the current cell value changes to that of the second text box on the user form (User) and changes the 4 column over to the value of that in the third text box on the user form (status). I'm getting stuck witht he replacing of the cell values and it hangs right after the "iserror" if statement. any suggestions |