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

[µo°Ý] ¦Û°Ê¶K¹Ï½s¼g¤è¦¡½Ð±Ð

[µo°Ý] ¦Û°Ê¶K¹Ï½s¼g¤è¦¡½Ð±Ð

¥»©«³Ì«á¥Ñ ¦K¤Ò ©ó 2011-10-24 10:01 ½s¿è

§Ú¬OVBA·s¤â§¹¥þ¤£À´^^"¡A
¤u§@³ø§i¤W¦³¤j¶qªº¹ÏÀÉ­n¶K¤J¡A
¤U­±µ{¦¡¼g¨ì§Ö¤â³n.....ÁÙ¨S¼g§¹¡A
¬G½Ð±Ð¦U¦ì¤j¤j§Ú¤U­±½s¼gªº¤è¦¡¬O§_¯à¥Î§ó²¼äªº»yªk¨Ó°µ¡C


Sub Macro1()
    Range("B264").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00000.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
   
    Range("g264").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00001.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
        
    Range("B281").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00002.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                  
    Range("G281").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00003.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
            
    Range("B298").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00004.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
               
    Range("G298").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00005.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                                    
    Range("B317").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00006.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                              
    Range("G317").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00007.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                     
    Range("B334").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00008.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                                
    Range("G334").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00009.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                             
    Range("B351").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00010.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                                       
    Range("G351").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00011.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                                 
    Range("B370").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00012.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                                       
    Range("G370").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00013.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                                    
    Range("B387").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00014.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
                                       
    Range("G387").Select
    ActiveSheet.Pictures.Insert( _
        "D:\test\TEK00015.PCX"). _
        Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 137.25
    Selection.ShapeRange.Width = 182.25
     
                                 
End Sub

·PÁª©¥DHsieh ¼ö¤ßªºÀ°¦£

¦^´_ 1# ¦K¤Ò

¸Õ¸Õ¬Ý
  1. Sub ex()
  2. For i = 0 To 101 Step 2 '³]¸m³Ì¤j½s¸¹
  3. For j = 0 To 1
  4. fs = "D:\test\TEK" & Format(i + j, "00000") & ".PCX"
  5.    With ActiveSheet.Pictures.Insert(fs)
  6.     .ShapeRange.LockAspectRatio = msoTrue
  7.     .ShapeRange.Height = 137.25
  8.     .ShapeRange.Width = 182.25
  9.      k = IIf(j = 0, 2, 7)
  10.     .Top = Cells(264 + 17 * (i / 2), k).Top
  11.     .Left = Cells(264 + 17 * (i / 2), k).Left

  12.    End With
  13. Next
  14. Next
  15. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD