March 18, 2019
vba find date and enter UserForm text box
hello, i have a list where vba need to find the date in sheets and also the machine name then paste the userform text box
userform works but it do not paste any info.
i have played around with this a few days and can not figure how to make it work, i really hope someone here can help with this
big thanks to Christofer Weber that made this work
and big thanks to 大灰狼1976 that made all the work
if someone need to download the complete file, the working file is located on the vbaexpress forum
thank you all
November 8, 2013
If you want to paste data rom textboxes into the correct sheet cells, the code from your CommandButton1 should look like this:
Set rng = .Rows(3).Find(Dat, lookat:=xlWhole)
If Not rng Is Nothing Then
Set mch = .Columns(1).Find(mch1, lookat:=xlWhole)
If Not mch Is Nothing Then
.Cells(mch.Row, rng.Column + 1) = TextBox1
.Cells(mch.Row, rng.Column + 2) = Format(TextBox2, "d/m/yy")
.Cells(mch.Row, rng.Column + 3) = TextBox3
MsgBox "can not find machine"
MsgBox "can not find date"