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

¸m¤J¹Ï¤ù

¸m¤J¹Ï¤ù

·Q½Ð°Ý¤j¤j
¥Ø«e§Ú¦b¬ã¨s¤@­Ó¥\¯à

¦pªG¸ê®Æ§¨¸Ì­±¦³N±i¹Ï¤ù
§ÚªºTest­¶ÅÒµe­±¥u¦³9®æÄæ¦ì
«ö¤U«ö¶s«áµ{¦¡·|±N¬Û¹ïÀ³ªº¹Ï¤ù¶×¤J(²»¨£¹Ï¤ù)

¦ý¬O¦pªG¶W¹L9®æÄæ¦ì
¯à¤£¯à¦Û°Ê½Æ»s¬Û¦Pªº­¶ÅÒ
¦A§â³Ñ¤U¨S¦³©ñ¶i¥hªº¹Ï¤ù¸m¤J
§Ú¥Ø«e¦³¤â°Ê¹Á¸Õ¹L½Æ»s­¶ÅÒ
¦ý¬OImage©R¦W¤£·|Åܦ¨ Image10~Image18
­n«ç»ò¼Ë¤~¯à¸Ñ¨M¥Ø«eªº²~ÀV><
§Æ±æ¯à¦³¯«¤H«ü¤Þ§Ú¤è¦V...
  1. Private Sub CommandButton1_Click()
  2. '----Ū¤J¹Ï¤ù

  3.     If Dir(ThisWorkbook.Path & "\" & "Test" & "\1.jpg") <> "" Then
  4.     Image1.Picture = LoadPicture(ThisWorkbook.Path & "\" & "Test" & "\1.jpg")
  5.     Else
  6.     Image1.Picture = LoadPicture(ThisWorkbook.Path & "\white.jpg")
  7.     End If
  8.    
  9.     If Dir(ThisWorkbook.Path & "\" & "Test" & "\2.jpg") <> "" Then
  10.     Image2.Picture = LoadPicture(ThisWorkbook.Path & "\" & "Test" & "\2.jpg")
  11.     Else
  12.     Image2.Picture = LoadPicture(ThisWorkbook.Path & "\white.jpg")
  13.     End If
  14.    
  15.     If Dir(ThisWorkbook.Path & "\" & "Test" & "\3.jpg") <> "" Then
  16.     Image3.Picture = LoadPicture(ThisWorkbook.Path & "\" & "Test" & "\3.jpg")
  17.     Else
  18.     Image3.Picture = LoadPicture(ThisWorkbook.Path & "\white.jpg")
  19.     End If
  20.    
  21.     If Dir(ThisWorkbook.Path & "\" & "Test" & "\4.jpg") <> "" Then
  22.     Image4.Picture = LoadPicture(ThisWorkbook.Path & "\" & "Test" & "\4.jpg")
  23.     Else
  24.     Image4.Picture = LoadPicture(ThisWorkbook.Path & "\white.jpg")
  25.     End If
  26.    
  27.     If Dir(ThisWorkbook.Path & "\" & "Test" & "\5.jpg") <> "" Then
  28.     Image5.Picture = LoadPicture(ThisWorkbook.Path & "\" & "Test" & "\5.jpg")
  29.     Else
  30.     Image5.Picture = LoadPicture(ThisWorkbook.Path & "\white.jpg")
  31.     End If
  32.    
  33.     If Dir(ThisWorkbook.Path & "\" & "Test" & "\6.jpg") <> "" Then
  34.     Image6.Picture = LoadPicture(ThisWorkbook.Path & "\" & "Test" & "\6.jpg")
  35.     Else
  36.     Image6.Picture = LoadPicture(ThisWorkbook.Path & "\white.jpg")
  37.     End If
  38.    
  39.      If Dir(ThisWorkbook.Path & "\" & "Test" & "\7.jpg") <> "" Then
  40.     Image7.Picture = LoadPicture(ThisWorkbook.Path & "\" & "Test" & "\7.jpg")
  41.     Else
  42.     Image7.Picture = LoadPicture(ThisWorkbook.Path & "\white.jpg")
  43.     End If
  44.    
  45.     If Dir(ThisWorkbook.Path & "\" & "Test" & "\8.jpg") <> "" Then
  46.     Image8.Picture = LoadPicture(ThisWorkbook.Path & "\" & "Test" & "\8.jpg")
  47.     Else
  48.     Image8.Picture = LoadPicture(ThisWorkbook.Path & "\white.jpg")
  49.     End If
  50.    
  51.     If Dir(ThisWorkbook.Path & "\" & "Test" & "\9.jpg") <> "" Then
  52.     Image9.Picture = LoadPicture(ThisWorkbook.Path & "\" & "Test" & "\9.jpg")
  53.     Else
  54.     Image9.Picture = LoadPicture(ThisWorkbook.Path & "\white.jpg")
  55.     End If
  56.    

  57.     End Sub
½Æ»s¥N½X
Jared

¦^´_ 1# Jared
ªþÀÉ ¬Ý¬Ý
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE

ªþÀɦp¤U¡A¤º¦³10±i¹Ï¤ù
§Æ±æ¯à­pºâ¶W¹L­ì¥»­¶ÅÒ¤ºªº®Ø¬[¹Ï¤ù
¯à¥t¥~·s¼W¬Û¦P¬[ºcªº­¶­±¸m¤J³Ñ¤U¹Ï¤ù

³Â·Ð§A¤F¡ã><
´ú¸ÕVBA.zip (169.77 KB)
Jared

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-7-15 18:29 ½s¿è

¦^´_ 3# Jared

¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim i As Integer, R As Integer, C As Integer
  4.     Dim S As String
  5.     R = 10  '²Ä10­Ó Image  ¦Cªº¦ì¸m
  6.     C = 1   '²Ä10­Ó Image  ø󪺦ì¸m
  7.     With ActiveSheet
  8.         i = 10
  9.         On Error Resume Next
  10.         Do
  11.             .OLEObjects("Image" & i).Delete
  12.             i = i + 1
  13.         Loop Until Err <> 0
  14.         Err.Clear
  15.         On Error GoTo 0
  16.         S = Dir(ThisWorkbook.Path & "\Test\*.gif")
  17.         i = 0
  18.         Do While S <> ""
  19.             i = i + 1
  20.             If i <= 9 Then
  21.                 .OLEObjects("Image" & i).Object.Picture = LoadPicture(ThisWorkbook.Path & "\Test\" & S)
  22.             Else
  23.              With .OLEObjects.Add(ClassType:="Forms.Image.1", Left:=.Cells(R, C).Left, Top:=.Cells(R, C).Top, Width:=.Cells(R, C).Resize(, 2).Width, Height:=.Cells(R, C).Resize(3).Height)
  24.                 .Name = "Image" & i
  25.                 .Object.Picture = LoadPicture(ThisWorkbook.Path & "\Test\" & S)
  26.                 R = R
  27.                 C = C + 2 'Image ¦³3Äæ(Äæ¼e=2)
  28.                 If C > 6 Then
  29.                     C = 1
  30.                     R = R + 3  'Image ¦³3¦C(¦C°ª=3¦C)
  31.                 End If
  32.              End With
  33.             End If
  34.             S = Dir
  35.         Loop
  36.         i = i + 1
  37.         On Error Resume Next
  38.         Do
  39.             If i <= 9 Then
  40.                 .OLEObjects("Image" & i).Object.Picture = LoadPicture("")
  41.             End If
  42.             i = i + 1
  43.         Loop Until Err <> 0
  44.     End With
  45. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE


·PÁ¤j¤jªº¨ó§U
¥u¬O¸ò§Ú·Q§¹¦¨ªº¦³ÂI¤£¤Ó¤@¼Ë

¬Q¤Ñ¦³¼g¤F¤j­P¤Wªº¤è¦V¡A¥i¥H°õ¦æ
¥u¬O§Úµ{¦¡¦b°õ¦æªº®É­Ô
¨S¦³±Ä¥Î§PÂ_©M°j°éªº¤è¦¡
¥H­P©óµ{¦¡½X¤@°ï...
³Ì«á¨S¿ìªk¦b²Ä¤G­¶§ó·s¹Ï¤ù(¦pªþÀÉ)
´ú¸ÕVBA.zip (184.11 KB)
Jared

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD