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

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

¥»©«³Ì«á¥Ñ 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

¦^´_ 11# GBKEE


    G¤j ª©¥D±z¦n¡G¹ï©ó°ÝÃD2 §Ú¦³·Ó±z»¡ªº±N­þ¤@¬qµ{¦¡ÁôÂôN¤£·|±N¨S¦³ªº¸ê®Æ¹ïÀ³ªº¹Ï¤ù¡A¼´¥X¤U¤@±i¹Ï¤ù¤F¡C
¬O§Ú¤§«e¨S¦³¸ò±z»¡²M·¡¡C

   ³o¼Ë´N¥þ³¡¸Ñ¨M¤F§Úªº°ÝÃD¤F¡A«Ü·PÁ±z³o»ò¦³­@¤ß¦a¦^ÂЧڪº°ÝÃD¡A¦A¦¸·PÁ±z¡C

TOP

¥»©«³Ì«á¥Ñ jeffrey628litw ©ó 2018-6-18 09:46 ½s¿è

¦^´_ 11# GBKEE


    G¤j ª©¤j±z¦n¡G§Ú¦³¦Û¤v§ï¦¨¥i¥H¼´4­Ó¹Ï¤ùªºÀɮסA¦p¤µ¦³·sªº°ÝÃD¡G
1.Åã¥Ü¹Ï¤ù¥i¥H¦Û°Ê½Õ¾ã¹Ï¤ù¤j¤p¦b®Ø®Ø¤º¡G±NDisplay Each Player Photo ³o«ö¶sÅã¥Üªº¥Õ¦â®Ø®Ø¤º¹Ï¤ù¥i¥H
¦Û°ÊÅã¥Ü©M After Sieve Display Photo ¥Õ¦â®Ø®Ø¤º¹Ï¤ù¦Û°Ê½Õ¾ã¤j¤p¤Î¦ì¸m

    §ï¦¨-->   ¦P¤j¤p¤Î¦ì¸m

2.·Q­nÅã¥Ü¹Ï¤ù¸ê®Æ¡A¥H«K¶W³sµ²¨ìDatabase ¤u§@ªí¡A(¤£ª¾¬O§_¥ÎTextbox¡A¬Oªº¸Ü­n¦p¦ó¼gVBA©O?)
1.§Æ±æ±N¤u§@ªíDatabase ¸Ì­±±NEÄæ¹ïÀ³BÄ檺¸ê®Æ¼´¥X¨Ó¡A
¨ìTextbox¡A
¨Ò¦pE3¼´¥XB3¨ìTextbox1
2.µM«áÅýDatabaseªº¤å¦r¶W³sµ²¨ì¤u§@ªí Database


Àɮ׶³ºÝ³sµ²¡Ghttp://webhd.xuite.net/_oops/jeffrey628litw/u05

ÁÂÁª©¤jªºÀ°¦£¡C

TOP

¦^´_ 13# jeffrey628litw


    ³o­Ó°ÝÃD¤U­±¼g¿ù¡AÀ³¸Ó¬O
2.·Q­nÅã¥Ü¹Ï¤ù¸ê®Æ¡A¥H«K¶W³sµ²¨ìDatabase ¤u§@ªí¡A(¤£ª¾¬O§_¥ÎTextbox¡A¬Oªº¸Ü­n¦p¦ó¼gVBA©O?)
1.§Æ±æ±N¤u§@ªíDatabase ¸Ì­±±NEÄæ¹ïÀ³BÄ檺¸ê®Æ¼´¥X¨Ó¡A
¨ìTextbox¡A
¨Ò¦pE3¼´¥XB3¨ìTextbox1
2.µM«áÅýTextboxªº¤å¦r¶W³sµ²¨ì¤u§@ªí Database

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

¦^´_ 15# GBKEE


    G¤j ª©¥D±z¦n¡G¥X²{¤U­±ªº±¡ªp¡A§Ú¬d¤£¨ì¦p¦ó¸Ñ?

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

¦^´_ 17# GBKEE


    G¤j ª©¥D±z¦n  ¡G§Ú¾ã²z¦nÀɮפF¡A¤w¸g²Å¦X§Úªº·Qªk¤F¡A«D±`·PÁ±zªº¤j¤OÀ°¦£¡A§Ú¤]±NÀɮשñ¦b³o¸Ì¤À¨É¡A¦A¦¸·PÁ¡C

   ¶³ºÝÀɮפÀ¨É¡Ghttp://webhd.xuite.net/_oops/jeffrey628litw/uxz

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

¦^´_ 19# GBKEE


    G¤j ª©¥D±z¦n¡G§Ú¤£À´±zªº·N«ä¡A§ÚF15Àx¦s®æ¬O¬G·N¤£©ñ¹Ï¤ù­n´ú¸Õ¼´¤£¼´ªº¥X¹w³]ªº¹Ï¤ù(¨S¦³¹Ï¤ù)

TOP

        ÀR«ä¦Û¦b : ¸Ü¦h¤£¦p¸Ü¤Ö¡A¸Ü¤Ö¤£¦p¸Ü¦n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD