為了避免頻繁的鼠標和鍵盤之間的切換,所以參考了網上的方法。
遇見問題 1 https://zhidao.baidu.com/question/137331184366987605.html
遇建問題2 https://jingyan.baidu.com/article/ca41422f121c771eaf99ed10.html
錄制宏之后,文件類型也應當發生改變, 改成了 .xlsm
Sub 單元格着色() ' ' 單元格着色 宏 ' ' 快捷鍵: Ctrl+q ' With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = -4.99893185216834E-02 .PatternTintAndShade = 0 End With End Sub