½Ð°Ý§Ú³oVBAþ¸Ì¦³°ÝÃD¡H¬°¤°»ò·|µLªk¥X²{ 424 µLªk§ä¨ìª«¥ó©O?
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2018-6-20 09:01 ½s¿è
¦^´_ 14# jeffrey628litw
¸Õ¸Õ¬Ý- Option Explicit '±j¨î ¼Ò²ÕªºÅܼƥ²¶·n Dimªº«Å§i,·|¨Ïµ{¦¡©ö©ó°»¿ù
- Dim Sh(1 To 2) As Worksheet, D As Object, xTempPicture As String '¼Ò²Õ³»ºÝ¤W DimªºÅÜ¼Æ ¥i¦bUserForm1ªº¥þ³¡µ{¦¡¤¤¨Ï¥Î
- Dim AR_Image(), AR_TexTbox(), AR_Label(), xName As String
- Private Sub UserForm_Initialize()
- Dim A As Range, S As String, E As Variant
- Set Sh(1) = ThisWorkbook.Sheets("Database") '¤u§@ªí¦p¦³Åܰʮɦb¦¹×§ï§Y¥i
- Set Sh(2) = ThisWorkbook.Sheets.Add
- AR_Image = Array(Image1, Image2, Image3, Image4)
- AR_TexTbox = Array(TextBox1, TextBox2, TextBox3, TextBox4)
- AR_Label = Array(Label1, Label4, Label6, Label8)
- xTempPicture = "D:\NoPicture.jpg"
- xName = "D:\temp.jpg"
- ·Ó¤ùExport Sh(1).Range("F2"), xTempPicture '¸m¤J"¨S¦³¹Ï¤ù"ÀÉ ·í§@¹w³]¹Ï¤ù¤Î¨S¦³¹Ï¤ù
- Set D = CreateObject("Scripting.Dictionary")
- For Each A In Sh(1).Range(Sh(1).[E3], Sh(1).[E3].End(xlDown))
- S = Replace(Trim(A), vbLf, Space(1)) '´«¦æ¦r¤¸ §ï¦¨ Space(1)
- If D.EXISTS(S) Then
- D(S) = D(S) & "," & A.Offset(, 1).Address
- Else
- D(S) = A.Offset(, 1).Address
- End If
- Next
- ComboBox1.List = D.KEYS
- For E = 0 To UBound(AR_Image)
- With AR_Image(E) '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
- .Picture = LoadPicture(xTempPicture)
- .PictureAlignment = fmPictureAlignmentCenter ' *** 0,1,2,3,4
- .PictureSizeMode = 3 'fmPictureSizeModeClip ' *** 0,1,3
- '***** ½Ð¦Û¦æ½Õ¾ã******
- '**1.Åã¥Ü¹Ï¤ù¥i¥H¦Û°Ê½Õ¾ã¹Ï¤ù¤j¤p¦b®Ø®Ø¤º¡G±NDisplay Each Player Photo ³o«ö¶sÅã¥Üªº¥Õ¦â®Ø®Ø¤º¹Ï¤ù¥i¥H
- '***¦Û°ÊÅã¥Ü©M After Sieve Display Photo ¥Õ¦â®Ø®Ø¤º¹Ï¤ù¦Û°Ê½Õ¾ã¤j¤p¤Î¦ì¸m
- End With
- AR_TexTbox(E).MultiLine = True '«ü©w±±¨î¶µ¬O§_±µ¨ü¨ÃÅã¥Ü¦h¦æ¤å¦r¡C
- AR_Label(E).WordWrap = False '¤º®e¦b¦æ¥½¬O§_¦Û°Ê´«¦æ
- Next
- End Sub
- '***********************************************************************************
- '¥H¤U¬°¶}±ÒUserForm1®É·|¦Û°Ê¶}±Ò1¤u§@ªí¡A¦³¥H¤Uµ{¦¡¦bÃö³¬UserForm1®É·|¦Û°ÊÃö³¬¤u§@ªí
- Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
- Application.DisplayAlerts = False
- Sh(2).Delete
- Kill xTempPicture
- Kill xName ' "D:\temp.jpg" '§R°£¼È¦s¹Ï¤ù
- Application.DisplayAlerts = True
- End Sub
- '***********************************************************************************
- Private Sub ComboBox1_Change()
- Dim A As Variant, i As Integer, S As String, ii As Integer
- For i = 0 To UBound(AR_Label)
- AR_Label(i).Caption = "¨S¦³¦¹¹Ï¤ù"
- AR_TexTbox(i).Text = ""
- AR_Image(i).Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù ¬° Databasse ¤u§@ªí¤¤ªº F3 Àx¦s®æ¹Ï¤ù
- Next
- With ComboBox1
- If .ListIndex = -1 Then Exit Sub
- A = Split(D(.Value), ",")
- For i = 0 To 3 '¦pn¼W¥[©Î´î¤Ö¹Ï¤ù«h קï i = 0 To 3 «á±ªº3ªº¼Æ¶q
- If i <= UBound(A) Then
- S = A(i)
- If ¹Ï¤ùÀˬd(S) Then '
- AR_Image(ii).Picture = LoadPicture(xName)
- AR_Label(ii).Caption = Sh(1).Range(S).Offset(, -1).Text
- AR_TexTbox(ii).Text = Sh(1).Range(S).Offset(, -4).Text
- ii = ii + 1
- End If
- End If
- Next
- End With
- End Sub
- Private Function ¹Ï¤ùÀˬd(xPicture As String) As Boolean
- Dim S As Shape
- For Each S In Sh(1).Shapes
- '*************************************************
- 'Shapeª«¥ó¬O·Ó¤ù¥B¦ì¸m¬OD(ComboBox1.Value).Address)
- If S.Type = msoPicture And S.TopLeftCell.Address = xPicture Then
- ¹Ï¤ùÀˬd = True
- Exit For
- End If
- '***************************************************
- Next
- If ¹Ï¤ùÀˬd = True Then ·Ó¤ùExport S, xName
-
- End Function
- Private Sub ·Ó¤ùExport(P As Object, xName As String)
- If xName <> "D:\temp.jpg" Then
- P.CopyPicture
- Else
- P.Copy
- End If
- With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
- .Chart.Paste '¶K¤W¹Ï¤ù
- .Chart.Export xName '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
- .Delete '§R°£¹Ïªí
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 228
- ¥DÃD
- 62
- ºëµØ
- 0
- ¿n¤À
- 364
- ÂI¦W
- 20
- §@·~¨t²Î
- Win 10
- ³nÅ骩¥»
- Office 2007 & 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-3-5
- ³Ì«áµn¿ý
- 2024-9-16
|
¦^´_ 13# jeffrey628litw
³oÓ°ÝÃD¤U±¼g¿ù¡AÀ³¸Ó¬O
2.·QnÅã¥Ü¹Ï¤ù¸ê®Æ¡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
|
|
|
|
|
|
|
- ©«¤l
- 228
- ¥DÃD
- 62
- ºëµØ
- 0
- ¿n¤À
- 364
- ÂI¦W
- 20
- §@·~¨t²Î
- Win 10
- ³nÅ骩¥»
- Office 2007 & 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-3-5
- ³Ì«áµn¿ý
- 2024-9-16
|
|
|
|
|
|
|
- ©«¤l
- 228
- ¥DÃD
- 62
- ºëµØ
- 0
- ¿n¤À
- 364
- ÂI¦W
- 20
- §@·~¨t²Î
- Win 10
- ³nÅ骩¥»
- Office 2007 & 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-3-5
- ³Ì«áµn¿ý
- 2024-9-16
|
¦^´_ 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 |
|
|
|
|
|
|
- ©«¤l
- 228
- ¥DÃD
- 62
- ºëµØ
- 0
- ¿n¤À
- 364
- ÂI¦W
- 20
- §@·~¨t²Î
- Win 10
- ³nÅ骩¥»
- Office 2007 & 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-3-5
- ³Ì«áµn¿ý
- 2024-9-16
|
¦^´_ 9# GBKEE
G¤j ª©¥D±z¦n¡G§Ú¬Ý¤F°ÝÃD3¤]¸Ñ¨M¤F¡A³Ñ¤U°ÝÃD2¡A³oÅÞ¿è¬On¼g
·íLable1 And Lable4 ¤£¬°ªÅ®É¥B¤£¬Û¦P¡A«hÅã¥Ü2±i¹Ï¤ù¨ìImage1 ©MImage4¡A
§_«h ·íLable1¤£µ¥©ó Label4¡A«hÅã¥ÜImage1 ¥B Image4¬°ªÅ
§_«h ·íLabel1µ¥©óªÅ¡ALable4¤£µ¥©óªÅ¡A«hÅã¥ÜImage1¬°ªÅ ¥BÅã¥Ü Image4ªº¹Ï¤ù
¬O³o¼Ë¤l¶Ü? ¬Oªº¸Üµ{¦¡n«ç»ò¼g©O?¦A½Ð±z½ç±Ð¡AÁÂÁ¡C
¶³ºÝÀɮסGhttp://webhd.xuite.net/_oops/jeffrey628litw/gdn |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ 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¸Ô¥[»¡©ú- Option Explicit '±j¨î ¼Ò²ÕªºÅܼƥ²¶·n Dimªº«Å§i,·|¨Ïµ{¦¡©ö©ó°»¿ù
- Dim Sh(1 To 2) As Worksheet, D As Object, xTempPicture As String '¼Ò²Õ³»ºÝ¤W DimªºÅÜ¼Æ ¥i¦bUserForm1ªº¥þ³¡µ{¦¡¤¤¨Ï¥Î
- Private Sub UserForm_Initialize()
- Dim A As Range, S As String
- Set Sh(1) = ThisWorkbook.Sheets("Database") '¤u§@ªí¦p¦³Åܰʮɦb¦¹×§ï§Y¥i
- Set Sh(2) = ThisWorkbook.Sheets.Add
- xTempPicture = "D:\NoPicture.jpg"
- ·Ó¤ùExport Sh(1).Range("F2"), xTempPicture '¸m¤J"¨S¦³¹Ï¤ù"ÀÉ
- Set D = CreateObject("Scripting.Dictionary")
- For Each A In Sh(1).Range(Sh(1).[E3], Sh(1).[E3].End(xlDown))
- S = Replace(Trim(A), vbLf, Space(1)) '´«¦æ¦r¤¸ §ï¦¨ Space(1)
- If D.EXISTS(S) Then
- D(S) = D(S) & "," & A.Offset(, 1).Address
- Else
- D(S) = A.Offset(, 1).Address
- End If
- Next
- ComboBox1.List = D.KEYS
- Label1.WordWrap = False '¤º®e¦b¦æ¥½¬O§_¦Û°Ê´«¦æ
- Label4.WordWrap = False '*******·s¼WLabel±±¨î¶µ
- With Image1 '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
- .Picture = LoadPicture(xTempPicture)
- .PictureAlignment = fmPictureAlignmentCenter '2
- .PictureSizeMode = fmPictureSizeModeClip '0
- End With
- With Image2 '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
- .Picture = LoadPicture(xTempPicture)
- .PictureAlignment = fmPictureAlignmentCenter '2
- .PictureSizeMode = fmPictureSizeModeClip '0
- End With
- End Sub
- Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
- Application.DisplayAlerts = False
- Sh(2).Delete
- Kill xTempPicture
- Application.DisplayAlerts = True
- End Sub
- Private Sub ComboBox1_Change()
- Dim A As Variant, i As Integer, S As String
- Label1.Caption = "¨S¦³¦¹¹Ï¤ù"
- Label4.Caption = "¨S¦³¦¹¹Ï¤ù" '*******·s¼WLabel±±¨î¶µ
- Image1.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
- Image2.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
- With ComboBox1
- If .ListIndex = -1 Then Exit Sub
- A = Split(D(.Value), ",")
- For i = 0 To 1
- If i <= UBound(A) Then
- S = A(i)
- If ¹Ï¤ùÀˬd(S, IIf(i = 0, Image1, Image2)) Then Label1.Caption = .Value
- End If
- Next
- Label4.Visible = UBound(A) = 0 '¦³¬Û¦Pªº Player Name «h¤£Åã¥Ü
- If UBound(A) = 0 And .ListIndex < .ListCount - 1 Then
- A = Split(D(.List(.ListIndex + 1)), ",")
- S = A(0)
- If ¹Ï¤ùÀˬd(S, Image2) Then Label4.Caption = .List(.ListIndex + 1, 0)
- '*******·s¼WLabel±±¨î¶µ
- End If
- End With
- End Sub
- Private Function ¹Ï¤ùÀˬd(xPicture As String, xImage As Image) As Boolean
- Dim S As Shape, xName As String
- For Each S In Sh(1).Shapes
- '*************************************************
- 'Shapeª«¥ó¬O·Ó¤ù¥B¦ì¸m¬OD(ComboBox1.Value).Address)
- If S.Type = msoPicture And S.TopLeftCell.Address = xPicture Then
- ¹Ï¤ùÀˬd = True
- Exit For
- End If
- '***************************************************
- Next
- If ¹Ï¤ùÀˬd = True Then
- xName = "D:\temp.jpg"
- ·Ó¤ùExport S, xName
- xImage.Picture = LoadPicture(xName) 'ªí³æÅã¥Ü¹Ï¤ù
- Kill xName ' "D:\temp.jpg" '§R°£¼È¦s¹Ï¤ù
- End If
- End Function
- Private Sub ·Ó¤ùExport(P As Object, xName As String)
- If xName <> "D:\temp.jpg" Then
- P.CopyPicture
- Else
- P.Copy
- End If
- With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
- .Chart.Paste '¶K¤W¹Ï¤ù
- .Chart.Export xName '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
- .Delete '§R°£¹Ïªí
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 228
- ¥DÃD
- 62
- ºëµØ
- 0
- ¿n¤À
- 364
- ÂI¦W
- 20
- §@·~¨t²Î
- Win 10
- ³nÅ骩¥»
- Office 2007 & 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-3-5
- ³Ì«áµn¿ý
- 2024-9-16
|
¦^´_ 7# GBKEE
G¤j ¶W¯Åª©¥D±z¦n¡A§Ú¬Ý±z¤w¸g¦³±N§Ú°ÝÃD1¸Ñ¨M¤F¡A¥t¥~nµ{¦¡¤¤»¡©ún·s¼W Lable4 §Ú¤]·s¼W¤F¡A
°ÝÃD2©M3ÁÙ¨S¸Ñ¨M¡A
±µ¤U¨Ó¡A
µ{¦¡ªºÅÞ¿è¬On¨Ì¾Ú¼´¥XªºLable4 ¦pªGµ²ªG¦PLable1ªº¦r¦ê¡A«h¼´¥X¹Ï¤ù¡A§_«h¼´¥XNullªº¹Ï¤ù¶Ü?
¬O³o¼Ëªº¸Ü½Ð°Ýn¦p¦ó¼g©O? ¦]¬°§Ú¹ï©óVBA¹ê¦b´X¥G§¹¥þ¤£¤F¸Ñ¡A¯à§_½Ð±zÀ°¦£¤@ÂI¤@ÂI¸Ñµ¹§Ú¬Ý¡A§ÚºCºC¾Ç©O?
ÁÂÁ±z¡C
Àɮצb¶³ºÝ¡Ghttp://webhd.xuite.net/_oops/jeffrey628litw/wyh |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 6# jeffrey628litw
¦A¸Õ¸Õ- Option Explicit '±j¨î ¼Ò²ÕªºÅܼƥ²¶·n Dimªº«Å§i,·|¨Ïµ{¦¡©ö©ó°»¿ù
- Dim Sh(1 To 2) As Worksheet, xTempPicture As String '¼Ò²Õ³»ºÝ¤W DimªºÅÜ¼Æ ¥i¦bUserForm1ªº¥þ³¡µ{¦¡¤¤¨Ï¥Î
- Private Sub UserForm_Initialize()
- Dim A As Range, i As Integer
- Set Sh(1) = ThisWorkbook.Sheets("Database") '¤u§@ªí¦p¦³Åܰʮɦb¦¹×§ï§Y¥i
- Set Sh(2) = ThisWorkbook.Sheets.Add
- ¶×¤J¹Ï¤ù '¸m¤J"¨S¦³¹Ï¤ù"ÀÉ
- '¤£n¥Î¦r¨åª«¥ó Set D = CreateObject("Scripting.Dictionary")
- With ComboBox1
- For Each A In Sh(1).Range(Sh(1).[E3], Sh(1).[E3].End(xlDown))
- 'ColumnCount ÄÝ©Ê Y±N ColumnCount ³]¦¨ 0¡AÅã¥Üªº¦æ¼Æ«K¬O 0¡FY³]¦¨ -1¡A«KÅã¥Ü©Ò¦³ªº¸ê®Æ¦æ¡C¹ï¤@Ó«D¸ê®Æ³sµ²ªº¸ê®Æ¨Ó·½¦Ó¨¥¡A³Ì¦h¥u¯à¦³ 10 ¦æ (0 ¨ì 9)¡C
- .ColumnCount = 2 '¤F¸Ñ«á,¥i¤£¥Î¦¹¦æµ{¦¡½X?
- .AddItem
- .List(.ListCount - 1, 0) = A
- .List(.ListCount - 1, 1) = A.Offset(, 1).Address
- Next
- End With
- Label1.WordWrap = False '¤º®e¦b¦æ¥½¬O§_¦Û°Ê´«¦æ
- Label4.WordWrap = False '*******·s¼WLabel±±¨î¶µ
-
- With Image1 '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
- .Picture = LoadPicture(xTempPicture)
- .PictureAlignment = fmPictureAlignmentCenter '2
- .PictureSizeMode = fmPictureSizeModeClip '0
- End With
- With Image2 '³]©w¹Ï¤ùªºÅã¥Ü³]¼Ò¦¡
- .Picture = LoadPicture(xTempPicture)
- .PictureAlignment = fmPictureAlignmentCenter '2
- .PictureSizeMode = fmPictureSizeModeClip '0
- End With
- End Sub
- Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
- Application.DisplayAlerts = False
- Sh(2).Delete
- Kill xTempPicture
- Application.DisplayAlerts = True
- End Sub
- Private Sub ComboBox1_Change()
- Dim A As Range
- Label1.Caption = "¨S¦³¦¹¹Ï¤ù"
- Label4.Caption = "¨S¦³¦¹¹Ï¤ù" '*******·s¼WLabel±±¨î¶µ
- Image1.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
- Image2.Picture = LoadPicture(xTempPicture) 'ªí³æ¹w³]ªº¹Ï¤ù
- With ComboBox1
- If .ListIndex = -1 Then Exit Sub
- If ¹Ï¤ùÀˬd(.List(.ListIndex, 1), Image1) = True Then Label1.Caption = .Value
- If .ListIndex < .ListCount - 1 Then
- If ¹Ï¤ùÀˬd(.List(.ListIndex + 1, 1), Image2) Then Label4.Caption = .List(.ListIndex + 1, 0)
- '*******·s¼WLabel±±¨î¶µ
- End If
- End With
- End Sub
- Private Function ¹Ï¤ùÀˬd(xPicture As String, xImage As Image) As Boolean
- Dim S As Shape, P As Object, xName As String
- For Each S In Sh(1).Shapes
- '*************************************************
- 'Shapeª«¥ó¬O·Ó¤ù¥B¦ì¸m¬OD(ComboBox1.Value).Address)
- If S.Type = msoPicture And S.TopLeftCell.Address = xPicture Then
- ¹Ï¤ùÀˬd = True
- Set P = S '.Copy '¹Ï¤ù½Æ»s
- Exit For
- End If
- '***************************************************
- Next
- If ¹Ï¤ùÀˬd = True Then
- xName = "D:\temp.jpg"
- ·Ó¤ùExport P, xName
- xImage.Picture = LoadPicture(xName) 'ªí³æÅã¥Ü¹Ï¤ù
- Kill xName ' "D:\temp.jpg" '§R°£¼È¦s¹Ï¤ù
- End If
- End Function
- Private Sub ·Ó¤ùExport(P As Object, xName As String)
- P.Copy
- With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
- .Chart.Paste '¶K¤W¹Ï¤ù
- .Chart.Export xName '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
- .Delete '§R°£¹Ïªí
- End With
- End Sub
- Sub ¶×¤J¹Ï¤ù()
- Dim P As Range
- xTempPicture = "D:\NoPicture.jpg"
- Set P = Sh(1).[f2]
- P.CopyPicture
- With Sh(2).ChartObjects.Add(1, 1, P.Width, P.Height) '·s¼W¹Ïªí
- .Chart.Paste '¶K¤W¹Ï¤ù
- .Chart.Export xTempPicture '¶×¥X¹Ïªí¡A¼È¦s¹Ï¤ù
- .Delete '§R°£¹Ïªí
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 228
- ¥DÃD
- 62
- ºëµØ
- 0
- ¿n¤À
- 364
- ÂI¦W
- 20
- §@·~¨t²Î
- Win 10
- ³nÅ骩¥»
- Office 2007 & 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-3-5
- ³Ì«áµn¿ý
- 2024-9-16
|
|
|
|
|
|
|