lt;a href=quot;img232.imageshack.us/my.php?image=userform6mz.jpgquot;
target=quot;_blankquot;gt;lt;img
src=quot;img232.imageshack.us/img232/5901/userform6mz.th.jpgquot; border=quot;0quot;
alt=quot;Free Image Hosting at www.ImageShack.usquot; /gt;lt;/agt;
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(quot;A65536quot;).Row 1
Index = Application.Match(HFC, Range(quot;Sheet1!A1:A65536quot;), 0)
If IsError(Index) Then
MsgBox quot;Not Found, check HFC MAC and try againquot;
End If
Set Index.Offset(0, 3).Value = Me.txtUser.Value
Set Index.Offset(0, 4).Value = Me.txtStat2.Value
Me.txtHFC1.Value = quot;quot;
Me.txtUser.Value = quot;quot;
Me.txtStat2.Value = quot;quot;
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 quot;iserrorquot; if
statement. any suggestions
ok i was playing around and made a slight alteration to the macrto. i'm
almost to my goal but i am still getting tripped up. i need to make the
active cell the cell in which the macro finds the value. so when the macro
searches for the number and it finds the value in a5 for example, then the
new activecell is a5....
- Nov 18 Sat 2006 20:10
Userform/macro help
close
全站熱搜
留言列表
發表留言