Excel userform runs when value is entered



Excel userform runs when value is entered. Userform auto runs without pressing buttons. Check out my online courses www.easyexcelanswers.com/courses.html
All my courses include online support and a user manual
Let me teach you the VBA that I have learn in my five years of consulting

Let’s take the frustration out of user forms

Become an Affiliate and earn 25% on Course Sales

For more help visit my website www.easyexcelanswers.com or email me at easyexcelanswers@gmail.com.

Contact me regarding customizing this template for your needs.

Click for online Excel Consulting

I am able to provide online help on your computer at a reasonable rate.

I use a Blue condenser Microphone to record my videos, here is the link

Check out Crowdcast for creating your webinars

If you need to buy Office 2019 follow

I use Tube Buddy to help promote my videos
Check them out

Follow me on Facebook

TWEET THIS VIDEO

Follow me on twitter
easyexcelanswers

IG @barbhendersonconsulting

You can help and generate a translation to you own language

*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.
Code
Private Sub CommandButton1_Click()
rownumber = Line.Value
Sheet1.Range(Cells(rownumber, 1), Cells(rownumber, 10)).Interior.ColorIndex = 4
Sheet1.Cells(rownumber, 11).Value = TextBox3.Value
End Sub

Private Sub CommandButton2_Click()
ordertxt.Value = “”
Line.Value = “”
TextBox3.Value = “”
End Sub
Private Sub ordertxt_Change()
If Len(ordertxt.Text) (is greater than) 5 Then
Call searchorder
Else
Exit Sub
End If
End Sub

With searchform
.Width = 250
.Height = 180
.Show
End With

End Sub

Sub searchorder()
Dim order As String
Dim rownumber As String
Dim x As Long

order = searchform.ordertxt.Text
x = 2
LR = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row

For x = 2 To LR
If Left(Sheet1.Cells(x, 1).Value, 6) = order Then
rownumber = x
Sheet1.Cells(rownumber, 1).Select
searchform.Line.Value = rownumber
GoTo ende
End If
Next x

If x = LR Then
MsgBox “No order number found”
GoTo ende
End If
ende:
End Sub

Watch more new videos about Excel Office | Synthesized by Mindovermetal English

Rate this post

Bài viết liên quan

Theo dõi
Thông báo của
guest
0 Comments
Phản hồi nội tuyến
Xem tất cả bình luận