返回列表 上一主題 發帖

儲存格每一列固定文字大小

本帖最後由 kimbal 於 2010-8-25 20:39 編輯

回復 1# y663258

大約是這樣? 行數內大小寫死.
  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
複製代碼
懂得發問,答案就會在其中

今日の一秒は  明日にない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

        靜思自在 : 有心就有福,有願就有力,自造福田,自得福緣。
返回列表 上一主題