- ©«¤l
- 97
- ¥DÃD
- 31
- ºëµØ
- 0
- ¿n¤À
- 133
- ÂI¦W
- 0
- §@·~¨t²Î
- xp2007
- ³nÅ骩¥»
- xp2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2012-8-12
- ³Ì«áµn¿ý
- 2020-12-25
|
GBKEE ª©¤j, ¦w¦n
³o两¤Ñ²Ó¬Ý¤j¤j©Ò¼gªºµ{¦¡, ¦Ñ¹ê»¡, ¥uª¾¹D¬OÂIÂI, ¦P®É¥çµo²{¤@ӹϤù°ÝÃD,
§Æ±æ¤j¤j¯à¨ó§U, ¦b¤j¤jªºµ{¦¡¤¤¬O¥i¥H¹B¦æ, ¦ý·í¹J¤W¤@¨Ç¤£¤ä´©ªº¹Ï¤ù®æ¦¡
¦ppng, «K·|¼u¥X¤U¦C´£¥Ü,
°õ¦æ¶¥¬q¿ù»~91, ¨S¦³³]©wª«¥óÅܼƩÎwith°Ï¶ôÅܼÆ,
¤j¤j, ¥i§_קïµ{¦¡¦Ü¥ô¦ó¹Ï¤ù®æ¦¡³£¥i¨Ï¥Î, ·Ð³Ò¤j¤j, ¦b¦¹¥ý¦æÁÂÁÂÁÂ!!
Option Explicit '¦b¼Ò²Õ¼h¦¸¤¤±j¢¨CÓ¦b¼Ò²ÕùتºÅܼƳ£¥²¶·©ú½Tªº«Å§i¡C
Private Const ½s¸¹ = 3 '¸ê®Æ®wªºÄæ¦ì¦C¸¹
Private Const ThePicture = "d:\ttt.gif" '³]¥ß¶×¥X¹Ï¤ùªº¸ô®|ÀɦW
Dim Ar(10), Sh As Worksheet
Private Sub UserForm_Initialize() 'ªí³æªì©l¤Æªº¹w³]¨Æ¥óµ{§Ç
Dim I As Integer, e As Range
Set Sh = Sheets("Sheet1") '¸ê®Æ®wªº¤u§@ªí
With Sh
For Each e In .Range("a4", .[a4].End(xlDown)) '«ü©w ComboBox1ªº¤º®e
With ComboBox1 'ComboBox1.ColumnCount=1 ¨t²Î¹w³] Åã¥Ü1Äæ¸ê®Æ
' .ColumnCount=2 '¥iÅã¥Ü2Äæ¸ê®Æ
.AddItem
'AddItem ¤èªk ¦b¤@Ó³æ¦C²M³æ¤è¶ô©Î¤U©Ô¦¡²M³æ¤è¶ô¤¤¥[¤J¤@Ó¶µ¥Ø¡C¦b¤@Ó¦h¦C²M³æ¤è¶ô©Î¤U©Ô¦¡²M³æ¤è¶ô¤¤¥[¤J¤@¦æ¡C
.List(.ListCount - 1, 0) = e 'ComboBox²Ä1Äæ : ¦r¦ê
.List(.ListCount - 1, 1) = e.Row - ½s¸¹ 'ComboBox²Ä2Äæ : ¦C¸¹ 1 - ....
End With
Next
End With
For I = 0 To UBound(Ar)
Set Ar(I) = Me.Controls("TextBox" & I + 1) '°}¦Cªº¤¸¯À³]¬°TextBox (ª«¥ó)
Next
Image1.PictureSizeMode = fmPictureSizeModeStretch
'°Ñ¼ÆfmPictureSizeModeStretch= 1 :½Õ¾ã¹Ï¤ù¤j¤p¥H¶ñº¡ªí³æ©Î¬¡¶¡A¦¹³]©w·|³y¦¨¹Ï¤ùªº¤ô¥»P««ª½¤è¦V¤ñ¨Ò³Q§á¦±¡C
End Sub
Private Sub UserForm_Click() '¦bªí³æ¨S¦³±±¨î¶µªº¦a¤è«ö¤U·Æ¹«¥ªÁ䪺¨Æ¥ó
'1·í¹Ï¤ù¶Ç¦^ªí³æ, ¹Ï¤ù¤£²M, ¥i¦³¤è¿ì¸Ñ¨M ':קïÅã¥ÜI´º¹Ï¤ùªº¤è¦¡
With Image1
If .PictureSizeMode = fmPictureSizeModeClip Then
.PictureSizeMode = fmPictureSizeModeStretch
ElseIf .PictureSizeMode = fmPictureSizeModeStretch Then
.PictureSizeMode = fmPictureSizeModeZoom
ElseIf .PictureSizeMode = fmPictureSizeModeZoom Then
.PictureSizeMode = fmPictureSizeModeClip
End If
End With
' [ ±` ¼Æ] [È] [ »¡ ©ú]
'fmPictureSizeModeClip 0 µô±¼¹Ï¤ù¦h¥X¨Óªº³¡¤À ( ¹w³] )¡C
'fmPictureSizeModeStretch 1 ½Õ¾ã¹Ï¤ù¤j¤p¥H¶ñº¡ªí³æ©Î¬¡¶¡A¦¹³]©w·|³y¦¨¹Ï¤ùªº¤ô¥»P««ª½¤è¦V¤ñ¨Ò³Q§á¦±¡C
'fmPictureSizeModeZoom 3 ©ñ¤j¹Ï¤ù¡A¦ý¤£§á¦±¹Ï¤ù¤ô¥»P««ª½¤è¦Vªº¤ñ¨Ò¡C
End Sub
Private Sub ComboBox1_Change()
Dim Sp As Picture, I As Integer, R As Integer
If ComboBox1.ListIndex > -1 Then '¿ï¾Ü ComboBox1ªº¤º®e
R = ComboBox1.List(ComboBox1.ListIndex, 1) 'ComboBox²Ä2Äæ : ¦C¸¹ 1....
For I = 0 To UBound(Ar)
If I <> UBound(Ar) Then
Ar(I).Text = Sh.Cells(½s¸¹ + R, I + 2) '¦C¸¹ : ½s¸¹ + R
Else
'2, ¦b²Ä11ÓTextBox11ª«¥ó¤¤, ¥i§_°µ¨ì§âsheet1²Ä11Äæ¤Î12Äæ¦X«÷Åã¥Ü,¦p123aaa
Ar(I).Text = Sh.Cells(½s¸¹ + R, I + 2) & Sh.Cells(½s¸¹ + R, I + 3)
End If
Next
End If
With Sh
For Each Sp In .Pictures '´M§äNÄ椤ªº¹Ï¤ù,½Æ»s¤§
If Sp.TopLeftCell.Address(0, 0) = "N" & ½s¸¹ + R Then Sp.Copy: Exit For
Next
'§Q¥Î¹Ïªí¶×¥X¦sÀÉ
With .ChartObjects.Add(1, 1, Sp.Width, Sp.Height) '·s¼W ¹Ïªí
.Chart.Paste '¶K¤W ¹Ï¤ù
.Chart.Export Filename:=ThePicture '¶×¥X ¹Ï¤ù
.Delete '§R°£ ¹Ïªí
End With
End With
Image1.Picture = LoadPicture(ThePicture) 'Image1 «ü©w¹Ï¤ù
End Sub |
|