- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 239
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-4
|
¦^´_ 21# ©P¤j°¶ - Private Sub Label1_Click() '·s¼W¸ê®Æ
-
- Dim Ar(), A As Range, B As Range, C As Range, MyPic As Shape
- Set dpic = CreateObject("Scripting.Dictionary")
-
- Set C = Sheet1.[A:A].Find(TextBox1.Text, lookat:=xlWhole)
-
- If Not C Is Nothing Then MsgBox ("¾Ç¸¹«½Æ¡A½Ð«·sÀˬd"): Exit Sub
-
- fd = ThisWorkbook.Path & "\"
-
- If Dir(fd & "Temp.bmp") <> "" Then Kill fd & "Temp.bmp"
-
- SavePicture Image1.Picture, fd & "Temp.bmp"
-
- obs = Array("TextBox1", "TextBox2", "TextBox3", "TextBox4", "TextBox5", "TextBox6", "ComboBox1", "TextBox7", "TextBox8", "TextBox9", "TextBox10", "TextBox11", "ComboBox2")
-
- For i = 0 To 12
-
- ReDim Preserve Ar(i)
-
- Ar(i) = Controls(obs(i)).Text
-
- Next
-
- With Sheet1
-
- Set A = .Cells(.Rows.Count, 1).End(xlUp).Offset(1)
-
- A.RowHeight = 79.8
-
- Set B = A.Offset(, 13)
-
- A.Resize(, 13) = Ar
-
- Set MyPic = .Shapes.AddPicture(fd & "Temp.bmp", msoFalse, msoCTrue, B.Left, B.Top, B.Width, B.Height)
-
- For Each pic In Sheet1.Shapes
- If pic.Type = 13 Then dpic(.Cells(pic.TopLeftCell.Row, 1).Value) = pic.Name
- Next
-
- .Range("A3").CurrentRegion.Sort key1:=.[A4], Header:=xlYes '±Æ§Ç
- If Val(Application.Version) > 11 Then
- For Each A In .Range(.[A4], .Cells(.Rows.Count, 1).End(xlUp))
- .Shapes(dpic(A.Value)).Top = A.Top
- Next
- End If
-
- End With
-
- Unload Me: UserForm1.Show
-
- End Sub
½Æ»s¥N½X |
|