ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð°Ý§Ú³oVBA­þ¸Ì¦³°ÝÃD¡H¬°¤°»ò·|µLªk¥X²{ 424 µLªk§ä¨ìª«¥ó©O?

¥»©«³Ì«á¥Ñ GBKEE ©ó 2018-6-13 08:27 ½s¿è

¦^´_ 1# jeffrey628litw

¸Õ¸Õ¬Ý
  1. Option Explicit                  '±j¨î ¼Ò²ÕªºÅܼƥ²¶·­n Dimªº«Å§i,·|¨Ïµ{¦¡©ö©ó°»¿ù
  2. Dim D As Object, Sh As Worksheet '¼Ò²Õ³»ºÝ¤W DimªºÅÜ¼Æ ¥i¦bUserForm1ªº¥þ³¡µ{¦¡¤¤¨Ï¥Î
  3. Private Sub UserForm_Initialize()
  4.     Dim A As Range, S As String
  5.     Set D = CreateObject("Scripting.Dictionary")
  6.     Set Sh = Sheets("Database") '¤u§@ªí¦p¦³Åܰʮɦb¦¹­×§ï§Y¥i
  7.     'With Sheets("Database") ' ©Î¬O With Sheet1
  8.     With Sh
  9.         For Each A In .Range(.[E2], .[E2].End(xlDown))
  10.             '**************************
  11.             'F10 ,F11 ¦³´«¦æ¦r¤¸ »Ý­×§ï
  12.             '¤j ¨¦µ¾¥­
  13.             'Shohei Ohtan
  14.             '***************************
  15.             S = Replace(Trim(A), vbLf, Space(1))  '´«¦æ¦r¤¸ §ï¦¨ Space(1)
  16.             Set D(S) = Range(A.Offset(, 1).Address)
  17.             'Debug.Print S, D(S).Address  '«ü¥O:À˵ø->¤Î®Éµøµ¡¥i¬Ý¬Ý
  18.         Next
  19.     End With
  20.     ComboBox1.List = D.keys
  21.     Label1.WordWrap = False   '¤º®e¦b¦æ¥½¬O§_¦Û°Ê´«¦æ
  22.     With Image1               '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
  23.         .PictureAlignment = fmPictureAlignmentCenter '2
  24.         .PictureSizeMode = fmPictureSizeModeClip     '0
  25.     End With
  26. End Sub
  27. Private Sub ComboBox1_Change()
  28.     Dim A As Range
  29.     Label1.Caption = "¨S¦³¦¹¹Ï¤ù"
  30.     Image1.Picture = LoadPicture("") '¤£Åã¥Ü¹Ï¤ù
  31.     'Image1.Visible = False      '©Î¬OÁôÂÃ
  32.     If ComboBox1.ListIndex = -1 Then Exit Sub
  33.     If ¹Ï¤ùÀˬd(D(ComboBox1.Value).Address) = False Then Exit Sub
  34.     'Image1.Visible = True      'Åã¥Ü
  35. End Sub
  36. Private Function ¹Ï¤ùÀˬd(xPicture As String) As Boolean
  37.     Dim S As Shape, P As Object, xTop As Double
  38.     For Each S In Sh.Shapes
  39.         '*************************************************
  40.         'Shapeª«¥ó¬O·Ó¤ù¥B¦ì¸m¬OD(ComboBox1.Value).Address)
  41.         If S.Type = msoPicture And S.TopLeftCell.Address = xPicture Then
  42.             ¹Ï¤ùÀˬd = True
  43.             S.Copy  '¹Ï¤ù½Æ»s
  44.             Set P = S
  45.             Exit For
  46.         End If
  47.         '***************************************************
  48.     Next
  49.     If ¹Ï¤ùÀˬd = True Then
  50.         With Sh
  51.             Label1.Caption = ComboBox1
  52.             With .ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
  53.                 .Chart.Paste '¶K¤W¹Ï¤ù
  54.                 .Chart.Export "D:\temp.jpg" '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
  55.                 .Delete '§R°£¹Ïªí
  56.             End With
  57.             Image1.Picture = LoadPicture("D:\temp.jpg") 'ªí³æÅã¥Ü¹Ï¤ù
  58.             Kill "D:\temp.jpg" '§R°£¼È¦s¹Ï¤ù
  59.         End With
  60.     End If
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# jeffrey628litw
¸Õ¸Õ¬Ý
  1. Option Explicit                  '±j¨î ¼Ò²ÕªºÅܼƥ²¶·­n Dimªº«Å§i,·|¨Ïµ{¦¡©ö©ó°»¿ù
  2. Dim D As Object, Sh(1 To 2) As Worksheet '¼Ò²Õ³»ºÝ¤W DimªºÅÜ¼Æ ¥i¦bUserForm1ªº¥þ³¡µ{¦¡¤¤¨Ï¥Î
  3. Dim xTempPicture As String
  4. Private Sub UserForm_Initialize()
  5.     Dim A As Range, S As String
  6.     Set D = CreateObject("Scripting.Dictionary")
  7.     Set Sh(1) = ThisWorkbook.Sheets("Database") '¤u§@ªí¦p¦³Åܰʮɦb¦¹­×§ï§Y¥i
  8.     Set Sh(2) = ThisWorkbook.Sheets.Add
  9.     xTempPicture = "D:\IE.jpg"
  10.     ¶×¤J¹Ï¤ù   '¸ü¤Jªí³æµe­±¹Ï¤ù
  11.     With Sh(1)
  12.         For Each A In .Range(.[E2], .[E2].End(xlDown))
  13.             '**************************
  14.             'F10 ,F11 ¦³´«¦æ¦r¤¸ »Ý­×§ï
  15.             '¤j ¨¦µ¾¥­
  16.             'Shohei Ohtan
  17.             '***************************
  18.             S = Replace(Trim(A), vbLf, Space(1)) '´«¦æ¦r¤¸ §ï¦¨ Space(1)
  19.             Set D(S) = Range(A.Offset(, 1).Address)
  20.             'Debug.Print S, D(S).Address  '«ü¥O:À˵ø->¤Î®Éµøµ¡¥i¬Ý¬Ý
  21.         Next
  22.     End With
  23.     ComboBox1.List = D.KEYS
  24.     Label1.WordWrap = False   '¤º®e¦b¦æ¥½¬O§_¦Û°Ê´«¦æ
  25.     With Image1               '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
  26.         .Picture = LoadPicture(xTempPicture)
  27.         .PictureAlignment = fmPictureAlignmentCenter '2
  28.         .PictureSizeMode = fmPictureSizeModeClip     '0
  29.     End With
  30.     With Image2               '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
  31.         .Picture = LoadPicture(xTempPicture)
  32.         .PictureAlignment = fmPictureAlignmentCenter '2
  33.         .PictureSizeMode = fmPictureSizeModeClip     '0
  34.     End With
  35. End Sub
  36. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
  37.     Application.DisplayAlerts = False
  38.     Sh(2).Delete
  39.     Kill xTempPicture
  40.     Application.DisplayAlerts = True
  41. End Sub
  42. Private Sub ComboBox1_Change()
  43.     Dim A As Range
  44.     Label1.Caption = "¨S¦³¦¹¹Ï¤ù"
  45.     Image1.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
  46.     Image2.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
  47.     'Image1.Visible = False      '©Î¬OÁôÂÃ
  48.     With ComboBox1
  49.         If .ListIndex = -1 Then Exit Sub
  50.         ¹Ï¤ùÀˬd D(.List(.ListIndex)).Address, Image1
  51.         If ¹Ï¤ùÀˬd(D(.Value).Address, Image1) Then Label1.Caption = ComboBox1
  52.         If .ListIndex < .ListCount - 1 Then ¹Ï¤ùÀˬd D(.List(.ListIndex + 1)).Address, Image2
  53.     End With
  54. End Sub
  55. Private Function ¹Ï¤ùÀˬd(xPicture As String, xImage As Image) As Boolean
  56.     Dim S As Shape, P As Object, xName As String
  57.     For Each S In Sh(1).Shapes
  58.         '*************************************************
  59.         'Shapeª«¥ó¬O·Ó¤ù¥B¦ì¸m¬OD(ComboBox1.Value).Address)
  60.         If S.Type = msoPicture And S.TopLeftCell.Address = xPicture Then
  61.             ¹Ï¤ùÀˬd = True
  62.             Set P = S '.Copy '¹Ï¤ù½Æ»s
  63.             Exit For
  64.         End If
  65.         '***************************************************
  66.     Next
  67.     If ¹Ï¤ùÀˬd = True Then
  68.         xName = "D:\temp.jpg"
  69.         ·Ó¤ùExport P, xName
  70.         xImage.Picture = LoadPicture(xName) 'ªí³æÅã¥Ü¹Ï¤ù
  71.         Kill xName ' "D:\temp.jpg" '§R°£¼È¦s¹Ï¤ù
  72.     End If
  73.     End Function
  74. Private Sub ·Ó¤ùExport(P As Object, xName As String)
  75.     P.Copy
  76.     With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
  77.         .Chart.Paste '¶K¤W¹Ï¤ù
  78.         .Chart.Export xName '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
  79.         .Delete '§R°£¹Ïªí
  80.      End With
  81. End Sub
  82. Sub ¶×¤J¹Ï¤ù()
  83.     Dim P As Picture
  84.     With Sh(2)
  85.         Set P = .Pictures.Insert("http://forum.twbts.com/templates/discuz6/images/logotop.png") '(¤u§@ªí¤W´¡¤J·Ó¤ù)
  86.         With [a1]                           '«ü©wªºÀx¦s®æ
  87.             P.Top = .Top                    '·Ó¤ùªº¥k¤è¦b¤u§@ªí¤Wªº¦ì¸m
  88.             P.Left = .Left                  '·Ó¤ùªº¥k¤è¦b¤u§@ªí¤Wªº¦ì¸m
  89.             .RowHeight = IIf(P.Height >= 409, 409, P.Height)        '½Õ¾ãÀx¦s®æ°ª«×=>·Ó¤ùªº°ª«×
  90.             P.Height = IIf(P.Height >= 409, 409, P.Height)          '½Õ¾ãÀx¦s®æ°ª«×=>·Ó¤ùªº°ª«×
  91.             If .Width < P.Width * (.ColumnWidth / .Width) Then   '¤U¸ü·Ó¤ùªº³Ì¤j¼e«×
  92.              .Width = P.Width * (.ColumnWidth / .Width)
  93.             .ColumnWidth = P.Width * (.ColumnWidth / .Width)    '½Õ¾ãÀx¦s®æÄæ¼e=>·Ó¤ùªº¼e«×
  94.             End If
  95.        End With
  96.      End With
  97.     ·Ó¤ùExport P, xTempPicture
  98. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# jeffrey628litw
¦A¸Õ¸Õ
  1. Option Explicit                  '±j¨î ¼Ò²ÕªºÅܼƥ²¶·­n Dimªº«Å§i,·|¨Ïµ{¦¡©ö©ó°»¿ù
  2. Dim Sh(1 To 2) As Worksheet, xTempPicture As String '¼Ò²Õ³»ºÝ¤W DimªºÅÜ¼Æ ¥i¦bUserForm1ªº¥þ³¡µ{¦¡¤¤¨Ï¥Î
  3. Private Sub UserForm_Initialize()
  4.     Dim A As Range, i As Integer
  5.     Set Sh(1) = ThisWorkbook.Sheets("Database") '¤u§@ªí¦p¦³Åܰʮɦb¦¹­×§ï§Y¥i
  6.     Set Sh(2) = ThisWorkbook.Sheets.Add
  7.     ¶×¤J¹Ï¤ù   '¸m¤J"¨S¦³¹Ï¤ù"ÀÉ
  8.      '¤£­n¥Î¦r¨åª«¥ó    Set D = CreateObject("Scripting.Dictionary")
  9.     With ComboBox1
  10.         For Each A In Sh(1).Range(Sh(1).[E3], Sh(1).[E3].End(xlDown))
  11.            'ColumnCount ÄÝ©Ê ­Y±N ColumnCount ³]¦¨ 0¡AÅã¥Üªº¦æ¼Æ«K¬O 0¡F­Y³]¦¨ -1¡A«KÅã¥Ü©Ò¦³ªº¸ê®Æ¦æ¡C¹ï¤@­Ó«D¸ê®Æ³sµ²ªº¸ê®Æ¨Ó·½¦Ó¨¥¡A³Ì¦h¥u¯à¦³ 10 ¦æ (0 ¨ì 9)¡C
  12.             .ColumnCount = 2  '¤F¸Ñ«á,¥i¤£¥Î¦¹¦æµ{¦¡½X?
  13.             .AddItem
  14.             .List(.ListCount - 1, 0) = A
  15.             .List(.ListCount - 1, 1) = A.Offset(, 1).Address
  16.         Next
  17.     End With
  18.     Label1.WordWrap = False   '¤º®e¦b¦æ¥½¬O§_¦Û°Ê´«¦æ
  19.     Label4.WordWrap = False   '*******·s¼WLabel±±¨î¶µ
  20.    
  21.     With Image1               '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
  22.         .Picture = LoadPicture(xTempPicture)
  23.         .PictureAlignment = fmPictureAlignmentCenter '2
  24.         .PictureSizeMode = fmPictureSizeModeClip     '0
  25.     End With
  26.     With Image2               '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
  27.         .Picture = LoadPicture(xTempPicture)
  28.         .PictureAlignment = fmPictureAlignmentCenter '2
  29.         .PictureSizeMode = fmPictureSizeModeClip     '0
  30.     End With
  31. End Sub
  32. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
  33.     Application.DisplayAlerts = False
  34.     Sh(2).Delete
  35.     Kill xTempPicture
  36.     Application.DisplayAlerts = True
  37. End Sub
  38. Private Sub ComboBox1_Change()
  39.     Dim A As Range
  40.     Label1.Caption = "¨S¦³¦¹¹Ï¤ù"
  41.     Label4.Caption = "¨S¦³¦¹¹Ï¤ù"  '*******·s¼WLabel±±¨î¶µ
  42.     Image1.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
  43.     Image2.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
  44.     With ComboBox1
  45.         If .ListIndex = -1 Then Exit Sub
  46.         If ¹Ï¤ùÀˬd(.List(.ListIndex, 1), Image1) = True Then Label1.Caption = .Value
  47.         If .ListIndex < .ListCount - 1 Then
  48.             If ¹Ï¤ùÀˬd(.List(.ListIndex + 1, 1), Image2) Then Label4.Caption = .List(.ListIndex + 1, 0)
  49.                                                                '*******·s¼WLabel±±¨î¶µ
  50.         End If
  51.     End With
  52. End Sub
  53. Private Function ¹Ï¤ùÀˬd(xPicture As String, xImage As Image) As Boolean
  54.     Dim S As Shape, P As Object, xName As String
  55.     For Each S In Sh(1).Shapes
  56.         '*************************************************
  57.         'Shapeª«¥ó¬O·Ó¤ù¥B¦ì¸m¬OD(ComboBox1.Value).Address)
  58.         If S.Type = msoPicture And S.TopLeftCell.Address = xPicture Then
  59.             ¹Ï¤ùÀˬd = True
  60.             Set P = S '.Copy '¹Ï¤ù½Æ»s
  61.             Exit For
  62.         End If
  63.         '***************************************************
  64.     Next
  65.     If ¹Ï¤ùÀˬd = True Then
  66.         xName = "D:\temp.jpg"
  67.         ·Ó¤ùExport P, xName
  68.         xImage.Picture = LoadPicture(xName) 'ªí³æÅã¥Ü¹Ï¤ù
  69.         Kill xName ' "D:\temp.jpg" '§R°£¼È¦s¹Ï¤ù
  70.     End If
  71.     End Function
  72. Private Sub ·Ó¤ùExport(P As Object, xName As String)
  73.     P.Copy
  74.     With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
  75.         .Chart.Paste '¶K¤W¹Ï¤ù
  76.         .Chart.Export xName '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
  77.         .Delete '§R°£¹Ïªí
  78.      End With
  79. End Sub
  80. Sub ¶×¤J¹Ï¤ù()
  81.     Dim P As Range
  82.     xTempPicture = "D:\NoPicture.jpg"
  83.     Set P = Sh(1).[f2]
  84.     P.CopyPicture
  85.     With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
  86.         .Chart.Paste '¶K¤W¹Ï¤ù
  87.         .Chart.Export xTempPicture '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
  88.         .Delete '§R°£¹Ïªí
  89.      End With
  90. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2018-6-16 06:26 ½s¿è

¦^´_ 8# jeffrey628litw
¹ï©óVBA¤£¤F¸Ñ,¥i¦h¬Ý¬Ý½×¾Âªº¥DÃD¤ÎVBA¤W»¡©ú,¨Ã¦h½m²ß,·|¶i¨Bªº
¤£À´¥i´£°Ý.¤º®eÅý¤H¬ÝÀ´´N·|±o¨ì¦^ÂÐ(¸q°È©Ê)

¦p¦³¤£²Å,½Ð¦A¸Ô¥[»¡©ú
  1. Option Explicit                  '±j¨î ¼Ò²ÕªºÅܼƥ²¶·­n Dimªº«Å§i,·|¨Ïµ{¦¡©ö©ó°»¿ù
  2. Dim Sh(1 To 2) As Worksheet, D As Object, xTempPicture As String  '¼Ò²Õ³»ºÝ¤W DimªºÅÜ¼Æ ¥i¦bUserForm1ªº¥þ³¡µ{¦¡¤¤¨Ï¥Î
  3. Private Sub UserForm_Initialize()
  4.     Dim A As Range, S As String
  5.     Set Sh(1) = ThisWorkbook.Sheets("Database") '¤u§@ªí¦p¦³Åܰʮɦb¦¹­×§ï§Y¥i
  6.     Set Sh(2) = ThisWorkbook.Sheets.Add
  7.      xTempPicture = "D:\NoPicture.jpg"
  8.     ·Ó¤ùExport Sh(1).Range("F2"), xTempPicture '¸m¤J"¨S¦³¹Ï¤ù"ÀÉ
  9.     Set D = CreateObject("Scripting.Dictionary")
  10.     For Each A In Sh(1).Range(Sh(1).[E3], Sh(1).[E3].End(xlDown))
  11.          S = Replace(Trim(A), vbLf, Space(1)) '´«¦æ¦r¤¸ §ï¦¨ Space(1)
  12.             If D.EXISTS(S) Then
  13.                 D(S) = D(S) & "," & A.Offset(, 1).Address
  14.             Else
  15.                 D(S) = A.Offset(, 1).Address
  16.             End If
  17.     Next
  18.     ComboBox1.List = D.KEYS
  19.     Label1.WordWrap = False   '¤º®e¦b¦æ¥½¬O§_¦Û°Ê´«¦æ
  20.     Label4.WordWrap = False   '*******·s¼WLabel±±¨î¶µ
  21.     With Image1               '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
  22.         .Picture = LoadPicture(xTempPicture)
  23.         .PictureAlignment = fmPictureAlignmentCenter '2
  24.         .PictureSizeMode = fmPictureSizeModeClip     '0
  25.     End With
  26.     With Image2               '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
  27.         .Picture = LoadPicture(xTempPicture)
  28.         .PictureAlignment = fmPictureAlignmentCenter '2
  29.         .PictureSizeMode = fmPictureSizeModeClip     '0
  30.     End With
  31. End Sub
  32. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
  33.     Application.DisplayAlerts = False
  34.     Sh(2).Delete
  35.     Kill xTempPicture
  36.     Application.DisplayAlerts = True
  37. End Sub
  38. Private Sub ComboBox1_Change()
  39.     Dim A As Variant, i As Integer, S As String
  40.     Label1.Caption = "¨S¦³¦¹¹Ï¤ù"
  41.     Label4.Caption = "¨S¦³¦¹¹Ï¤ù"  '*******·s¼WLabel±±¨î¶µ
  42.     Image1.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
  43.     Image2.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
  44.     With ComboBox1
  45.         If .ListIndex = -1 Then Exit Sub
  46.         A = Split(D(.Value), ",")
  47.         For i = 0 To 1
  48.             If i <= UBound(A) Then
  49.                 S = A(i)
  50.                 If ¹Ï¤ùÀˬd(S, IIf(i = 0, Image1, Image2)) Then Label1.Caption = .Value
  51.             End If
  52.         Next
  53.         Label4.Visible = UBound(A) = 0   '¦³¬Û¦Pªº Player Name «h¤£Åã¥Ü
  54.         If UBound(A) = 0 And .ListIndex < .ListCount - 1 Then
  55.             A = Split(D(.List(.ListIndex + 1)), ",")
  56.             S = A(0)
  57.             If ¹Ï¤ùÀˬd(S, Image2) Then Label4.Caption = .List(.ListIndex + 1, 0)
  58.                                                                '*******·s¼WLabel±±¨î¶µ
  59.         End If
  60.     End With
  61. End Sub
  62. Private Function ¹Ï¤ùÀˬd(xPicture As String, xImage As Image) As Boolean
  63.     Dim S As Shape, xName As String
  64.     For Each S In Sh(1).Shapes
  65.         '*************************************************
  66.         'Shapeª«¥ó¬O·Ó¤ù¥B¦ì¸m¬OD(ComboBox1.Value).Address)
  67.         If S.Type = msoPicture And S.TopLeftCell.Address = xPicture Then
  68.             ¹Ï¤ùÀˬd = True
  69.             Exit For
  70.         End If
  71.         '***************************************************
  72.     Next
  73.     If ¹Ï¤ùÀˬd = True Then
  74.         xName = "D:\temp.jpg"
  75.         ·Ó¤ùExport S, xName
  76.         xImage.Picture = LoadPicture(xName) 'ªí³æÅã¥Ü¹Ï¤ù
  77.         Kill xName ' "D:\temp.jpg" '§R°£¼È¦s¹Ï¤ù
  78.     End If
  79.     End Function
  80. Private Sub ·Ó¤ùExport(P As Object, xName As String)
  81.     If xName <> "D:\temp.jpg" Then
  82.         P.CopyPicture
  83.     Else
  84.         P.Copy
  85.     End If
  86.     With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
  87.         .Chart.Paste '¶K¤W¹Ï¤ù
  88.         .Chart.Export xName '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
  89.         .Delete '§R°£¹Ïªí
  90.      End With
  91. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2018-6-17 11:04 ½s¿è

¦^´_ 10# jeffrey628litw

2.    °ÝÃD2.
¼´ªº¦W¦r¥¿½Tªº¹Ï®×·|¥X¨Ó¡A¦ý·|¦h¼´¤U1Äæ¹Ï¤ù¡A¨S¦³¸ê®ÆªºÀ³¸Ó¼´ªº¹Ï¬OF1Àx¦s®æªº¨S¦³¹Ï¤ù (¦pªG°ÝÃD1±z¼g¦¨¹w³]¹Ï¤ù¬ONull¨º´N¤£¥Î¼´F1Àx¦s®æ)
³o¬O 6#¤¤ªº´£°Ý
§Ú²z¸Ñ¬OComboBox1©Ò¿ïªº¦W¦r¦³¹Ï®×®É Åãµø¦bImage1,¨S¦³¹Ï®×®ÉImage1¦¨¹w³]¹Ï¤ù(µ¹ªºµ{¦¡¬O³o¼Ë¼g¨S¿ù)

Ãö©óImage2 ³oµ{¦¡½X±ø¥ó¦¨¥ß®É¤~³B²z(³o¬O§Ú¦h°µªº³B²z¶Ü?)
  1. If UBound(A) = 0 And .ListIndex < .ListCount - 1 Then
½Æ»s¥N½X
UBound(A) = 0   **ComboBox1©Ò¿ïªº¦W¦r¦bDatabase¤¤¬O¤@ªº¦W¦r**
.ListIndex < .ListCount - 1   **©Ò¿ïªº¦W¦r¦bComboBox1ªºlist¤¤¤£¬O³Ì«á¤@­Óvalue(­È)¦W¦r
±N¤U­Ó¦W¦rªº¹Ï¤ùÅãµø¦bImage2

¦p¤£³B²z«h¶}ÀY´N³B²z¤F
  1. Private Sub ComboBox1_Change()
  2.     Dim A As Variant, i As Integer, S As String
  3.     Label1.Caption = "¨S¦³¦¹¹Ï¤ù"
  4.     Label4.Caption = "¨S¦³¦¹¹Ï¤ù"  '*******·s¼WLabel±±¨î¶µ
  5.     Image1.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
  6.     Image2.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
½Æ»s¥N½X
*****************************
3.    °ÝÃD3.
¼´¦P¦W¦r®É¨Ò¦p¤j¨¦µ¾¥­¡A¼´¤£¥X¦P¼Ë¦W¦r¦ý¤£¦P¹Ï¤ù,§Æ±æ§ïµ½¦¨Combobox1 (§Y¤U©Ô Players Name)¼´¦P¦W¦r®É¯à¼´¥X¤£¦P¹Ï
UBound(A) > 0®É-> **ComboBox1©Ò¿ïªº¦W¦r¦bDatabase¤£¬O¤@ªº¦W¦r**
  1. A = Split(D(.Value), ",")
  2.         For i = 0 To 1
  3.             If i <= UBound(A) Then
  4.                 S = A(i)
  5.                 If ¹Ï¤ùÀˬd(S, IIf(i = 0, Image1, Image2)) Then Label1.Caption = .Value
  6.             End If
  7.         Next
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2018-6-20 09:01 ½s¿è

¦^´_ 14# jeffrey628litw
¸Õ¸Õ¬Ý
  1. Option Explicit                  '±j¨î ¼Ò²ÕªºÅܼƥ²¶·­n Dimªº«Å§i,·|¨Ïµ{¦¡©ö©ó°»¿ù
  2. Dim Sh(1 To 2) As Worksheet, D As Object, xTempPicture As String  '¼Ò²Õ³»ºÝ¤W DimªºÅÜ¼Æ ¥i¦bUserForm1ªº¥þ³¡µ{¦¡¤¤¨Ï¥Î
  3. Dim AR_Image(), AR_TexTbox(), AR_Label(), xName As String
  4. Private Sub UserForm_Initialize()
  5.     Dim A As Range, S As String, E As Variant
  6.     Set Sh(1) = ThisWorkbook.Sheets("Database") '¤u§@ªí¦p¦³Åܰʮɦb¦¹­×§ï§Y¥i
  7.     Set Sh(2) = ThisWorkbook.Sheets.Add
  8.     AR_Image = Array(Image1, Image2, Image3, Image4)
  9.     AR_TexTbox = Array(TextBox1, TextBox2, TextBox3, TextBox4)
  10.     AR_Label = Array(Label1, Label4, Label6, Label8)
  11.     xTempPicture = "D:\NoPicture.jpg"
  12.     xName = "D:\temp.jpg"
  13.     ·Ó¤ùExport Sh(1).Range("F2"), xTempPicture '¸m¤J"¨S¦³¹Ï¤ù"ÀÉ ·í§@¹w³]¹Ï¤ù¤Î¨S¦³¹Ï¤ù
  14.     Set D = CreateObject("Scripting.Dictionary")
  15.     For Each A In Sh(1).Range(Sh(1).[E3], Sh(1).[E3].End(xlDown))
  16.          S = Replace(Trim(A), vbLf, Space(1)) '´«¦æ¦r¤¸ §ï¦¨ Space(1)
  17.             If D.EXISTS(S) Then
  18.                 D(S) = D(S) & "," & A.Offset(, 1).Address
  19.             Else
  20.                 D(S) = A.Offset(, 1).Address
  21.             End If
  22.     Next
  23.     ComboBox1.List = D.KEYS
  24.     For E = 0 To UBound(AR_Image)
  25.         With AR_Image(E)            '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
  26.             .Picture = LoadPicture(xTempPicture)
  27.             .PictureAlignment = fmPictureAlignmentCenter ' ***  0,1,2,3,4
  28.             .PictureSizeMode = 3 'fmPictureSizeModeClip  ' ***  0,1,3
  29.             '***** ½Ð¦Û¦æ½Õ¾ã******
  30.             '**1.Åã¥Ü¹Ï¤ù¥i¥H¦Û°Ê½Õ¾ã¹Ï¤ù¤j¤p¦b®Ø®Ø¤º¡G±NDisplay Each Player Photo ³o«ö¶sÅã¥Üªº¥Õ¦â®Ø®Ø¤º¹Ï¤ù¥i¥H
  31.             '***¦Û°ÊÅã¥Ü©M After Sieve Display Photo ¥Õ¦â®Ø®Ø¤º¹Ï¤ù¦Û°Ê½Õ¾ã¤j¤p¤Î¦ì¸m
  32.         End With
  33.         AR_TexTbox(E).MultiLine = True   '«ü©w±±¨î¶µ¬O§_±µ¨ü¨ÃÅã¥Ü¦h¦æ¤å¦r¡C
  34.         AR_Label(E).WordWrap = False   '¤º®e¦b¦æ¥½¬O§_¦Û°Ê´«¦æ
  35.     Next
  36. End Sub
  37. '***********************************************************************************
  38. '¥H¤U¬°¶}±ÒUserForm1®É·|¦Û°Ê¶}±Ò1¤u§@ªí¡A¦³¥H¤Uµ{¦¡¦bÃö³¬UserForm1®É·|¦Û°ÊÃö³¬¤u§@ªí
  39. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
  40.     Application.DisplayAlerts = False
  41.     Sh(2).Delete
  42.     Kill xTempPicture
  43.     Kill xName ' "D:\temp.jpg" '§R°£¼È¦s¹Ï¤ù
  44.     Application.DisplayAlerts = True
  45. End Sub
  46. '***********************************************************************************
  47. Private Sub ComboBox1_Change()
  48.     Dim A As Variant, i As Integer, S As String, ii As Integer
  49.     For i = 0 To UBound(AR_Label)
  50.         AR_Label(i).Caption = "¨S¦³¦¹¹Ï¤ù"
  51.         AR_TexTbox(i).Text = ""
  52.         AR_Image(i).Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù ¬° Databasse ¤u§@ªí¤¤ªº F3 Àx¦s®æ¹Ï¤ù
  53.     Next
  54.     With ComboBox1
  55.         If .ListIndex = -1 Then Exit Sub
  56.         A = Split(D(.Value), ",")
  57.         For i = 0 To 3                    '¦p­n¼W¥[©Î´î¤Ö¹Ï¤ù«h ­×§ï i = 0 To 3 «á­±ªº3ªº¼Æ¶q
  58.             If i <= UBound(A) Then
  59.                 S = A(i)
  60.                 If ¹Ï¤ùÀˬd(S) Then '
  61.                     AR_Image(ii).Picture = LoadPicture(xName)
  62.                     AR_Label(ii).Caption = Sh(1).Range(S).Offset(, -1).Text
  63.                     AR_TexTbox(ii).Text = Sh(1).Range(S).Offset(, -4).Text
  64.                     ii = ii + 1
  65.                 End If
  66.             End If
  67.         Next
  68.     End With
  69. End Sub
  70. Private Function ¹Ï¤ùÀˬd(xPicture As String) As Boolean
  71.     Dim S As Shape
  72.     For Each S In Sh(1).Shapes
  73.         '*************************************************
  74.         'Shapeª«¥ó¬O·Ó¤ù¥B¦ì¸m¬OD(ComboBox1.Value).Address)
  75.         If S.Type = msoPicture And S.TopLeftCell.Address = xPicture Then
  76.             ¹Ï¤ùÀˬd = True
  77.             Exit For
  78.         End If
  79.         '***************************************************
  80.     Next
  81.     If ¹Ï¤ùÀˬd = True Then ·Ó¤ùExport S, xName
  82.    
  83. End Function

  84. Private Sub ·Ó¤ùExport(P As Object, xName As String)
  85.     If xName <> "D:\temp.jpg" Then
  86.         P.CopyPicture
  87.     Else
  88.         P.Copy
  89.     End If
  90.     With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
  91.         .Chart.Paste '¶K¤W¹Ï¤ù
  92.         .Chart.Export xName '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
  93.         .Delete '§R°£¹Ïªí
  94.      End With
  95. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 16# jeffrey628litw

¬d¬Ý³oµ{§Ç¤Wªºµ{¦¡½X¦³µL¯Ê¥¢±¼
  1. Private Sub ·Ó¤ùExport(P As Object, xName As String)
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 18# jeffrey628litw
  [14] ¤j¨¦µ¾¥­ Shohei Ohtani²y´Î¥d²y´Î³»ºÝ   F15  ¨S¦³¹Ï¤ù
©Ò¥H­×§ï 15#ªºµ{¦¡½X,·|§ó¬°¶K¤Á
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 20# jeffrey628litw

F15Àx¦s®æ¬O¬G·N¤£©ñ¹Ï¤ù­n´ú¸Õ¼´¤£¼´ªº¥X¹w³]ªº¹Ï¤ù(¨S¦³¹Ï¤ù)
¨º¹Ï¤ù´N¨ÌÄò©ñ¦bImage1, Image2,Image3,Image4 ¤¤ Image3 ¬O¨S¦³¹Ï¤ùªº

­×§ï«á¬O±N¤T­Ó¦³¹Ï¤ù³sÄò©ñ¦bImage1, Image2,Image3 ,Image4 ¬O¨S¦³¹Ï¤ùªº
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 22# jeffrey628litw
3.µM«á¦]¬°¿z¿ï«á·|¶W¹L4±iImage
ComboBox1 ¥kÃä·s¼W¤@ComboBox3
ComboBox2 ¥kÃä·s¼W¤@ComboBox4
  1. Option Explicit                  '±j¨î ¼Ò²ÕªºÅܼƥ²¶·­n Dimªº«Å§i,·|¨Ïµ{¦¡©ö©ó°»¿ù
  2. '¼Ò²Õ³»ºÝ¤W DimªºÅÜ¼Æ ¥i¦bUserForm1ªº¥þ³¡µ{¦¡¤¤¨Ï¥Î
  3. Dim Sh(1 To 2) As Worksheet, D As Object, D1 As Object, xTempPicture As String
  4. Dim AR_Image(), AR_TexTbox(), AR_Label(), xName As String
  5. Private Sub UserForm_Initialize()
  6.     Dim A As Range, S As String, E As Variant
  7.     Set Sh(1) = ThisWorkbook.Sheets("Database") '¤u§@ªí¦p¦³Åܰʮɦb¦¹­×§ï§Y¥i
  8.     Set Sh(2) = ThisWorkbook.Sheets.Add
  9.     AR_Image = Array(Image1, Image2, Image3, Image4)
  10.     AR_TexTbox = Array(TextBox1, TextBox2, TextBox3, TextBox4)
  11.     AR_Label = Array(Label1, Label4, Label6, Label8)
  12.     xTempPicture = "D:\NoPicture.jpg"
  13.     xName = "D:\temp.jpg"
  14.     ·Ó¤ùExport Sh(1).Range("F2"), xTempPicture '¸m¤J"¨S¦³¹Ï¤ù"ÀÉ ·í§@¹w³]¹Ï¤ù¤Î¨S¦³¹Ï¤ù
  15.     ComboBox³]©w ComboBox1, D
  16.     For E = 0 To UBound(AR_Image)
  17.         With AR_Image(E)            '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡ '***** ½Ð¦Û¦æ½Õ¾ã******
  18.             .Picture = LoadPicture(xTempPicture)
  19.             .PictureAlignment = fmPictureAlignmentCenter ' ***  0,1,2,3,4
  20.             .PictureSizeMode = 3 'fmPictureSizeModeClip  ' ***  0,1,3
  21.         End With
  22.         AR_TexTbox(E).MultiLine = True   '«ü©w±±¨î¶µ¬O§_±µ¨ü¨ÃÅã¥Ü¦h¦æ¤å¦r¡C
  23.         AR_Label(E).WordWrap = False   '¤º®e¦b¦æ¥½¬O§_¦Û°Ê´«¦æ
  24.     Next
  25. End Sub
  26. '***********************************************************************************
  27. '¥H¤U¬°¶}±ÒUserForm1®É·|¦Û°Ê¶}±Ò1¤u§@ªí¡A¥H¤Uµ{¦¡¦bÃö³¬UserForm1®É·|¦Û°ÊÃö³¬¤u§@ªí
  28. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
  29.     Application.DisplayAlerts = False
  30.     Sh(2).Delete
  31.     Kill xTempPicture
  32.     Kill xName ' "D:\temp.jpg"
  33.     Application.DisplayAlerts = True
  34. End Sub
  35. '***********************************************************************************
  36. Private Sub ComboBox1_Change()
  37.     Dim A As Variant, i As Integer, S As String, ii As Integer
  38.     ²M¹Ï
  39.     With ComboBox1
  40.         If .ListIndex = -1 Then ComboBox2.Clear: ComboBox3.Clear: ComboBox4.Clear: Exit Sub
  41.         If IsArray(D(.Value)) Then A = D(.Value)(0) Else A = D(.Value)
  42.         ComboBox­¶³]©w ComboBox3, A
  43.         ComboBox³]©w ComboBox2, D1
  44.         If ComboBox3.Enabled Then ComboBox3.ListIndex = 0
  45.     End With
  46. End Sub
  47. Private Sub ComboBox2_Change()
  48.     Dim A As Variant
  49.     With ComboBox2
  50.         ²M¹Ï
  51.         If .ListIndex = -1 Then Exit Sub
  52.         A = D1(.Value)
  53.         If IsArray(D1(.Value)) Then A = D1(.Value)(0) Else A = D1(.Value)
  54.         ComboBox­¶³]©w ComboBox4, A
  55.         If ComboBox4.Enabled Then ComboBox4.ListIndex = 0
  56.     End With
  57. End Sub
  58. Private Sub ComboBox3_Change()
  59.     ²M¹Ï
  60.     ComboBox4.Clear
  61.     If ComboBox3.ListIndex > -1 Then ³]¹Ï ComboBox1, ComboBox3, D
  62. End Sub
  63. Private Sub ComboBox4_Change()
  64.     ²M¹Ï
  65.     If ComboBox4.ListIndex > -1 Then ³]¹Ï ComboBox2, ComboBox4, D1
  66.         
  67. End Sub
  68. Private Sub ²M¹Ï()
  69.     Dim i As Integer
  70.     For i = 0 To UBound(AR_Label)
  71.         AR_Label(i).Caption = "¨S¦³¦¹¹Ï¤ù"
  72.         AR_TexTbox(i).Text = ""
  73.         AR_Image(i).Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù ¬° Databasse ¤u§@ªí¤¤ªº F3 Àx¦s®æ¹Ï¤ù
  74.     Next
  75. End Sub
  76. Private Sub ³]¹Ï(ComBo As MSForms.ComBobox, ComBobox As MSForms.ComBobox, D As Object)
  77.     Dim P As Object, i As Integer, ii As Integer
  78.     With ComBobox
  79.         For i = .ListIndex * 4 To (.ListIndex + 1) * 4 - 1
  80.             If i <= UBound(D(ComBo.Value)(0)) Then
  81.                 AR_Label(ii).Caption = D(ComBo.Value)(1)(i)
  82.                 AR_TexTbox(ii).Text = D(ComBo.Value)(2)(i)
  83.                 Set P = D(ComBo.Value)(0)(i)
  84.                 ·Ó¤ùExport P, xName
  85.                 AR_Image(ii).Picture = LoadPicture(xName) 'ªí³æÅã¥Ü¹Ï¤ù
  86.                 ii = ii + 1
  87.             End If
  88.         Next
  89.     End With
  90. End Sub
  91. Private Sub ComboBox­¶³]©w(ComBo As MSForms.ComBobox, S As Variant)
  92.     Dim i As Integer
  93.     With ComBo
  94.         .Clear
  95.         Debug.Print .Name
  96.         ComBo.Enabled = IsArray(S)
  97.         If Not IsArray(S) Then Exit Sub
  98.         For i = 0 To UBound(S) Step 4
  99.             .AddItem Int((i + 1) / 4) + IIf(4 Mod (i + 1) >= 0, 1, 0)
  100.         Next
  101.     End With
  102. End Sub
  103. Private Sub ComboBox³]©w(ComBo As MSForms.ComBobox, D As Variant)
  104.     Dim A As Range, S As String, E As Variant, i As Integer, ii As Integer, iii As Integer, AR, AR1()
  105.     Dim xShape As Shape
  106.     Set D = CreateObject("Scripting.Dictionary")
  107.     For Each A In Sh(1).Range(Sh(1).Range("E3"), Sh(1).Range("E3").End(xlDown))
  108.         If ComBo.Name = "ComboBox1" Then
  109.             S = Replace(Trim(A), vbLf, Space(1))
  110.         Else
  111.             If ComboBox1 <> Replace(Trim(A), vbLf, Space(1)) Or Trim(A.Offset(, 5)) = "" Then GoTo Net
  112.             S = Replace(Trim(A.Offset(, 5)), vbLf, Space(1)) '´«¦æ¦r¤¸ §ï¦¨ Space(1)
  113.         End If
  114.         Set xShape = ¹Ï¤ùÀˬd(A.Offset(, 1).Address)
  115.         If Not xShape Is Nothing Then
  116.             If D.EXISTS(S) Then
  117.                 If IsArray(D(S)) Then
  118.                     AR = D(S)
  119.                     iii = UBound(AR(0)) + 1
  120.                     For ii = 0 To UBound(AR)
  121.                         ReDim AR1(0 To iii)
  122.                         For i = 0 To UBound(AR1)
  123.                             If ii = 0 Then If i < UBound(AR1) Then Set AR1(i) = AR(ii)(i) Else Set AR1(i) = xShape
  124.                             If ii = 1 Then If i < UBound(AR1) Then AR1(i) = AR(ii)(i) Else AR1(i) = A.Text
  125.                             If ii = 2 Then If i < UBound(AR1) Then AR1(i) = AR(ii)(i) Else AR1(i) = Sh(1).Cells(A.Row, "B").Text
  126.                         Next
  127.                         AR(ii) = AR1
  128.                     Next
  129.                     D(S) = AR
  130.                 Else
  131.                     D(S) = Array(Array(xShape), Array(A.Text), Array(Sh(1).Cells(A.Row, "B").Text))
  132.                 End If
  133.             Else
  134.                 D(S) = Array(Array(xShape), Array(A.Text), Array(Sh(1).Cells(A.Row, "B").Text))
  135.             End If
  136.         Else
  137.             If Not D.EXISTS(S) Then D(S) = False
  138.         End If
  139. Net:
  140.     Next
  141.     ComBo.Clear
  142.     If D.Count > 0 Then ComBo.List = D.KEYS
  143. End Sub
  144. Private Function ¹Ï¤ùÀˬd(xPicture As String) As Object
  145.     Dim S As Shape
  146.      Set ¹Ï¤ùÀˬd = Nothing
  147.     For Each S In Sh(1).Shapes
  148.         '*************************************************
  149.         'Shapeª«¥ó¬O·Ó¤ù¥B¦ì¸m¬OD(ComboBox1.Value).Address)
  150.         If S.Type = msoPicture And S.TopLeftCell.Address = xPicture Then
  151.             Set ¹Ï¤ùÀˬd = S
  152.             Exit For
  153.         End If
  154.         '***************************************************
  155.     Next
  156. End Function
  157. Private Sub ·Ó¤ùExport(P As Object, xName As String)
  158.     If xName <> "D:\temp.jpg" Then
  159.         P.CopyPicture
  160.     Else
  161.         P.Copy
  162.     End If
  163.     With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
  164.         .Chart.Paste '¶K¤W¹Ï¤ù
  165.         .Chart.Export xName '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
  166.         .Delete '§R°£¹Ïªí
  167.      End With
  168. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD