Hi Guys,
I'm not sure why shows Unspecified Error when try run the form on 2007 version and when close the file and run gain the error doesn't show , but shows from time another time !
when debug the error will stop on UserForm1.Show and try use F8 it keep in this line UserForm1.Show
I'm not sure what's the problem!
here is the code
any opinions guys?
I'm not sure why shows Unspecified Error when try run the form on 2007 version and when close the file and run gain the error doesn't show , but shows from time another time !
when debug the error will stop on UserForm1.Show and try use F8 it keep in this line UserForm1.Show
I'm not sure what's the problem!
here is the code
VBA Code:
Private Sub CommandButton1_Click()
Dim LR As Long
Dim ws As Worksheet
Set ws = Sheets("GOODS")
With ws
' determine last used cell in column B
LR = .Range("B" & .Rows.Count).End(xlUp).Row
[B]
.[/B]Rows(LR - 1).Insert xlShiftDown, xlFormatFromLeftOrAbove
.Rows(LR - 1).Value = .Rows(LR).Value
' copy UserForm values to last row
.Range("B" & LR) = Date
.Range("C" & LR) = TextBox1.Text
.Range("D" & LR) = TextBox2.Text
.Range("E" & LR) = TextBox3.Text
.Range("F" & LR) = TextBox4.Text
End With
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
End Sub