Private Sub UserForm_Initialize()
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.AskToUpdateLinks = False
Application.DisplayAlerts = False
ActiveWindow.View = xlNormalView
gotoform
Me.TextBox1.Value = Range("e27").Value
Me.TextBox2.Value = Range("i27").Value
Me.TextBox3.Value = Range("e28").Value
Me.TextBox4.Value = Range("i28").Value
Me.TextBox5.Value = Range("e29").Value
Me.TextBox6.Value = Range("i29").Value
Me.TextBox7.Value = Range("u18").Value
Me.TextBox8.Value = Range("u1").Value
gotowelcome
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.AskToUpdateLinks = True
Application.DisplayAlerts = True
Application.StatusBar = False
End Sub
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.AskToUpdateLinks = False
Application.DisplayAlerts = False
ActiveWindow.View = xlNormalView
go_form
If TextBox1.Value <> "" Then
Range("e27").Select
ActiveCell.Value = TextBox1
Else
MsgBox "ÊãÇã ÝíáÏåÇÈÇíÏÊßãÈá ÔæÏ"
Exit Sub
End If
If TextBox1.Value <> "" Then
Range("e27").Select
ActiveCell.Value = TextBox1
Else
MsgBox "ÊãÇã ÝíáÏåÇÈÇíÏÊßãÈá ÔæÏ"
Exit Sub
End If
If TextBox2.Value <> "" Then
Range("i27").Select
ActiveCell.Value = TextBox2
Else
MsgBox "ÊãÇã ÝíáÏåÇÈÇíÏÊßãÈá ÔæÏ"
Exit Sub
End If
If TextBox3.Value <> "" Then
Range("e28").Select
ActiveCell.Value = TextBox3
Else
MsgBox "ÊãÇã ÝíáÏåÇÈÇíÏÊßãÈá ÔæÏ"
Exit Sub
End If
If TextBox4.Value <> "" Then
Range("i28").Select
ActiveCell.Value = TextBox4
Else
MsgBox "ÊãÇã ÝíáÏåÇÈÇíÏÊßãÈá ÔæÏ"
Exit Sub
End If
If TextBox5.Value <> "" Then
Range("e29").Select
ActiveCell.Value = TextBox5
Else
MsgBox "ÊãÇã ÝíáÏåÇÈÇíÏÊßãÈá ÔæÏ"
Exit Sub
End If
If TextBox6.Value <> "" Then
Range("i29").Select
ActiveCell.Value = TextBox6
Else
MsgBox "ÊãÇã ÝíáÏåÇÈÇíÏÊßãÈá ÔæÏ"
Exit Sub
End If
If TextBox7.Value <> "" Then
Range("u18").Select
ActiveCell.Value = TextBox7
Else
MsgBox "ÊãÇã ÝíáÏåÇÈÇíÏÊßãÈá ÔæÏ"
Exit Sub
End If
If TextBox8.Value <> "" Then
Range("u1").Select
ActiveCell.Value = TextBox8
Else
MsgBox "ÊãÇã ÝíáÏåÇÈÇíÏÊßãÈá ÔæÏ"
Exit Sub
End If
gotowelcome
End
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.AskToUpdateLinks = True
Application.DisplayAlerts = True
Application.StatusBar = False
End Sub
Private Sub CommandButton2_Click()
gotowelcome
End
End Sub
برچسب:
نویسنده: زهرا فلاح