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

Àx¦s®æ¨C¤@¦C©T©w¤å¦r¤j¤p

Àx¦s®æ¨C¤@¦C©T©w¤å¦r¤j¤p

¦U¦ì¥ý¶i:
              ½ÐÀ°¦£§ó§ï¥H¤Uµ{¦¡½X¡A¤å¦r¨C¦C©T©w¤j¤p¡CÁÂÁÂ
                  
Sub S()
Sheet1.Range("A1").Value = Space(4) & Sheet2.Range("A1") _
  & Chr(10) & Space(4) & Sheet2.Range("A2") _
  & Chr(10) & Space(4) & Sheet2.Range("A3") _
& Chr(10) & Space(4) & Sheet2.Range("A4") _
& Chr(10) & Space(4) & Sheet2.Range("A5") _
& Chr(10) & Space(4) & Sheet2.Range("A6") _

With Sheet1.Range("A1")
.Characters(1, 160).Font.Name = "¼Ð·¢Åé" '¦]¸ê®Æ¨Ó·½¦r¼Æ·|¼W´î¡A©Ò¥H¤U¤è¦¡¤£¯àÅý
.Characters(1, 25).Font.Size = 22        '¨C¤@¦C©T©w¤å¦r¤j¤p,¦³¨ä¤è¦¡©T©w¤@¦C¤å¦r
.Characters(26, 46).Font.Size = 12       '¤j¤p
.Characters(47, 83).Font.Size = 16
.Characters(84, 106).Font.Size = 12
.Characters(107, 130).Font.Size = 16
.Characters(131, 150).Font.Size = 7
End With
End Sub

Book1.rar (7.3 KB)

¥»©«³Ì«á¥Ñ kimbal ©ó 2010-8-25 20:39 ½s¿è

¦^´_ 1# y663258

¤j¬ù¬O³o¼Ë? ¦æ¼Æ¤º¤j¤p¼g¦º.
  1.      Dim strstr As Variant
  2.     Dim strstr as variant
  3.     Dim size As variant
  4.     size = array(22,12,16,12,16,7)
  5.     strstr = Sheet2.Range("A1:A6").Value
  6.    
  7.     If UBound(strstr) <= 0 Then
  8.         Exit Sub
  9.     End If
  10.       
  11.     Sheet1.Range("A1").Value = Space(4)
  12.     For i = 1 To UBound(strstr)
  13.         Sheet1.Range("A1").Value = Sheet1.Range("A1").Value & strstr(i, 1) & Chr(10) & Space(4)
  14.     Next
  15.     Sheet1.Range("A1").Value = Left(Sheet1.Range("A1").Value, Len(Sheet1.Range("A1").Value) - 5)
  16.     j = 4
  17.    
  18.     For i = 1 To UBound(strstr)
  19.         Sheet1.Range("A1").Characters(j, j + Len(strstr(i, 1)) + 5).Font.size = size(i)
  20.         j = j + Len(strstr(i, 1)) + 6
  21.     Next
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

·PÁÂkimbal ª©¥D¤j¤O¨ó§U´ú¸Õ«á°}¦C¯Á¤Þ¶W¥X½d³ò¡A¥i§_¦AÀ°­Ó¦£­×¥¿¡CÁÂÁÂ
      Sub h()
  Dim strstr As Variant

    Dim size As Variant
    size = Array(22, 12, 16, 12, 16, 7)
    strstr = Sheet2.Range("A1:A6").Value
   
    If UBound(strstr) <= 0 Then
        Exit Sub
    End If
      
    Sheet1.Range("A1").Value = Space(4)
    For i = 1 To UBound(strstr)
        Sheet1.Range("A1").Value = Sheet1.Range("A1").Value & strstr(i, 1) & Chr(10) & Space(4)
    Next
    Sheet1.Range("A1").Value = Left(Sheet1.Range("A1").Value, Len(Sheet1.Range("A1").Value) - 5)
    j = 4
   
    For i = 1 To UBound(strstr)
        Sheet1.Range("A1").Characters(j, j + Len(strstr(i, 1)) + 5).Font.size = size(i)
        j = j + Len(strstr(i, 1)) + 6
    Next
   
End Sub

TOP

¦^´_ 1# y663258
  1. Sub ex()
  2. ay = Array(22, 12, 16, 12, 16, 7)
  3. With Sheet2
  4. mystr = Join(Application.Transpose(.Range(.[A1], .[A65536].End(xlUp)).Value), Chr(10))
  5. ar = Split(mystr, Chr(10)): k = 0
  6. With Sheet1.Range("A1")
  7.    .Value = mystr
  8.    Do Until i = Len(mystr) Or k > UBound(ar)
  9.        i = i + 1
  10.        Do Until Mid(mystr, i, 1) = Chr(10) Or i > Len(mystr)
  11.           .Characters(i, 1).Font.Size = ay(k)
  12.           i = i + 1
  13.        Loop
  14.        k = k + 1
  15.    Loop
  16. End With
  17. End With
  18. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁÂhsieh ¨ó§U¸g´ú¸Õ§¹¦¨²Å¦X»Ý¨D¡A¦¬¤U¦n¦n¾Ç²ß¡A¥H¤W·PÁ¤G¦ìª©¥D¡C

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-8-26 07:58 ½s¿è

¦^´_ 3# y663258
Dim strstr As Variant     ¦b¦³®Ä½d³ò¤º ­«´_«Å§i   §R±¼
size(i) ¨S¦³´î1              sizeªº°}¦C·|¶W¥X°}¦Cªº½d³ò ­×¥¿¦p¤U
Sheet1.Range("A1").Characters(j, j + Len(strstr(i, 1)) + 5).Font.size = size(i-1)

¥t¥~  j = j + Len(strstr(i, 1)) + 6         +6·|¶W¥X1­Ó¦r¤¸  À³¬O +5 ¤~¥¿½T
¥t¤@¸Ñªk°Ñ¦Ò°Ñ¦Ò
  1. Sub Ex()   
  2. Dim Rng As Range, strstr As Variant, size As Variant, i%
  3.     Set Rng = Sheet2.Range("A1:A6")
  4.     size = Array(22, 12, 16, 12, 16, 7)
  5.     For i = 1 To Rng.Rows.Count
  6.         If Rng(i) <> "" Then
  7.             strstr = IIf(strstr <> "", strstr & Chr(10) & Space(4) & Rng(i), Space(4) & Rng(i))
  8.         End If
  9.     Next
  10.     If Len(strstr) < Rng.Rows.Count Then Exit Sub
  11.     Sheet1.Range("A1").Value = strstr
  12.     j = 4
  13.     For i = 1 To Rng.Rows.Count
  14.         If Rng(i) <> "" Then
  15.         Sheet1.Range("A1").Characters(j, j + Len(Rng(i))).Font.size = size(i - 1)
  16.        j = j + Len(Rng(i)) + 5
  17.        End If
  18.     Next
  19. End Sub
½Æ»s¥N½X

TOP

ÁÂÁ¤G¦ì¨ó§U¦A´N±Ð¤@­Ó°ÝÃD¡A´«¦C¶¡¹j¤j¤p²{¬O¨Ì¤W¤@¦C¤å¦r¤j¤p¦Ó©w¡A¥i¥H°µ¨ì¦Û©w´«¦C¶¡¹j¤j¤p¶Ü?

TOP

        ÀR«ä¦Û¦b : ­n¤ñ½Ö§ó¨ü½Ö¡D¤£­n¤ñ½Ö§ó©È½Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD