返回列表 上一主題 發帖

填滿

填滿

各位前輩你們好!
        前輩!問題如附檔案說明 
           請知道的前輩,不吝賜教謝謝再三!!

Leov8.rar (9.95 KB)

回復 1# myleoyes
  1. Sub 填滿()
  2.     Dim E&, i&
  3.     E = Cells(ActiveCell.Row, 1).End(xlDown).Row
  4. Again:
  5.       ZZ = Application.InputBox("請輸入列數", "請輸入填滿間隔列數", 10, Type:=2)
  6.       If ZZ <= 0 Or ZZ = "" Then
  7.         MsgBox "間隔列數不得小於1列!!!", , "列數錯誤請重新輸入 !!"
  8.         GoTo Again
  9.       End If
  10.       Range("A1") = ZZ
  11.     For i = ActiveCell.Row To E Step ZZ
  12.         With Cells(i, 2).Resize(, 20).Interior
  13.             .Pattern = xlSolid
  14.             .PatternColorIndex = xlAutomatic
  15.             ' .ThemeColor = xlThemeColorAccent3
  16.             ' .TintAndShade = 0.799981688894314
  17.             ' .PatternTintAndShade = 0
  18.             '2003 沒有這些屬性
  19.         End With
  20.     Next
  21. End Sub
複製代碼

TOP

回復 2# GBKEE
GBKEE前輩你好!
     良師!又麻煩你...謝謝再三!!

TOP

        靜思自在 : 君子立恆志,小人恆立志。
返回列表 上一主題