You are on page 1of 3

��� ����� ������ ���� ����

Private Sub CommandButton2_Click()


Dim x As Long
Dim y As Worksheet
Set y = Sheets("sheet1")
x = y.Range("B" & Rows.Count).End(xlUp).Row
With y
.Cells(x + 1, "B").Value = TextBox1.Text
.Cells(x + 1, "C").Value = TextBox2.Text
.Cells(x + 1, "D").Value = TextBox3.Text
.Cells(x + 1, "E").Value = ComboBox1.Text
.Cells(x + 1, "F").Value = ComboBox2.Text
.Cells(x + 1, "G").Value = ComboBox3.Text
.Cells(x + 1, "H").Value = TextBox4.Text
.Cells(x + 1, "I").Value = TextBox5.Text

End With
Dim i As String
i = TextBox1.Text
FileCopy fpath, "C:\Picture\" & i & ".jpg"

TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""

End Sub
**************************************************************************
����� ��������
Private Sub CommandButton4_Click()
Dim x As Long
Dim y As Long
x = Sheets("Sheet1").Range("B" & Rows.Count).End(xlUp).Row

For y = 2 To x
If Sheets("Sheet1").Cells(y, 2).Text = TextBox6.Value Then

Sheets("Sheet1").Cells(y, 2) = TextBox1.Text
Sheets("Sheet1").Cells(y, 3) = TextBox2.Text
Sheets("Sheet1").Cells(y, 4) = TextBox3.Text
Sheets("Sheet1").Cells(y, 5) = ComboBox1.Text
Sheets("Sheet1").Cells(y, 6) = ComboBox2.Text
Sheets("Sheet1").Cells(y, 7) = ComboBox3.Text
Sheets("Sheet1").Cells(y, 8) = TextBox4.Text
Sheets("Sheet1").Cells(y, 9) = TextBox5.Text

End If
Next y

End Sub
***********************************************************************************
��� ������ ����

Private Sub CommandButton5_Click()


Dim x As Long
Dim y As Long

x = Sheets("Sheet1").Range("B" & Rows.Count).End(xlUp).Row


For y = 2 To x
If Sheets("Sheet1").Cells(y, 2).Text = TextBox6.Value Then
Rows(y).Delete shift:=xlUp

End If
Next y

End Sub
***********************************************************************************
*******
��� ��������

Unload Me
Application.Visible = True
Sheets("sheet2").Activate
***********************************************************************************
********
����� ������

Private Sub CommandButton6_Click()


End
End Sub
***********************************************************************************
************
��� �����

Private Sub CommandButton7_Click()


Dim x As Long
Dim y As Long
x = Sheets("Sheet1").Range("B" & Rows.Count).End(xlUp).Row

For y = 2 To x

If Sheets("Sheet1").Cells(y, 2).Text = TextBox6.Value Then

TextBox1.Text = Sheets("Sheet1").Cells(y, 2)
TextBox2.Text = Sheets("Sheet1").Cells(y, 3)
TextBox3.Text = Sheets("Sheet1").Cells(y, 4)
ComboBox1.Text = Sheets("Sheet1").Cells(y, 5)
ComboBox2.Text = Sheets("Sheet1").Cells(y, 6)
ComboBox3.Text = Sheets("Sheet1").Cells(y, 7)
TextBox4.Text = Sheets("Sheet1").Cells(y, 8)
TextBox5.Text = Sheets("Sheet1").Cells(y, 9)

End If
Next y

End Sub
*********************************************************************************

��� ����� ����

Private Sub CommandButton1_Click()


Dim x As Integer
Application.FileDialog(msoFileDialogOpen).AllowMultiSelect = False
x = Application.FileDialog(msoFileDialogOpen).Show
If x <> 0 Then
fpath = Application.FileDialog(msoFileDialogOpen).SelectedItems(1)
Image1.Picture = LoadPicture(fpath)
Image1.PictureSizeMode = 1
End If

End Sub
***********************************************************************************
******
��� ����� ������ ����

Sub RectangleDiagonalCornersRounded1_Click()
Dim x As Long
Dim y As Long
x = Sheets("Sheet1").Range("B" & Rows.Count).End(xlUp).Row

For y = 2 To x
If Sheet2.Range("B3").Value = Sheet1.Cells(y, "B").Value Then

Sheet2.Range("B10").Value = Sheet1.Cells(y, "B").Value


Sheet2.Range("B11").Value = Sheet1.Cells(y, "C").Value
Sheet2.Range("B12").Value = Sheet1.Cells(y, "D").Value
Sheet2.Range("B13").Value = Sheet1.Cells(y, "E").Value
Sheet2.Range("B14").Value = Sheet1.Cells(y, "F").Value
Sheet2.Range("B15").Value = Sheet1.Cells(y, "G").Value
Sheet2.Range("B16").Value = Sheet1.Cells(y, "H").Value
Sheet2.Range("B17").Value = Sheet1.Cells(y, "I").Value
End If
Next y

Dim i As Picture
Dim j As String
On Error Resume Next

If Target.Address = Range("B3").Address Then


ActiveSheet.Pictures.Delete

j = "C:\picture\" & Range("B3") & Value & ".jpg"

With Range("C10")

Set i = ActiveSheet.Pictures.Insert(j)

i.Height = 105
i.Width = 95
i.Top = .Top
i.Left = .Left
i.Placement = xlMoveAndSize

End With
End If

End Sub
***********************************************************************************
**********

You might also like