2017-05-26 87 views
0

我使用調色板將單元格1的背景顏色設置爲White, background 1, darker 15%使用VBA在Excel中設置相同的單元格顏色,在主題顏色中顯示選區

colour selection

然後我使用VBA這種顏色複製到下一個單元:

oOutSheet.Cells(1, 2).Interior.Color = oOutSheet.Cells(1, 1).Interior.Color 

第二小區的顏色將是相同的灰度,但在主題顏色調色板未選中在這裏看到:

colour selection 2

爲什麼「主題顏色」項不突出顯示爲White, background 1, darker 15%,我該怎麼做?

+0

我可以從VBA設置主題顏色? –

+0

我可以通過ThemeColor和TintAndShade來設置它 –

回答

0

如果oOutSheet.Cells(1, 1).Interior.ThemeColor = 1 -> 12值 我可以設置:

Dim tint as double 
tint=oOutSheet.Cells(1, 1).Interior.TintAndShade 
oOutSheet.Cells(1, 2).Interior.ThemeColor =oOutSheet.Cells(1, 1).Interior.ThemeColor 
oOutSheet.Cells(1, 2).Interior.TintAndShade = tint 
相關問題