2013年7月2日 星期二

Excel 2007 圖形 Pattern Fill問題

在Excel 2007 的圖形與圖案Fill Pattern的功能界面似乎消失了。但在Excel 2010版本又回復。如果使用者使用2007的版本相當不方便。 雖然Fill Pattern的界面消失,但實際的功能實際仍然是存在的。如果有需要的使用者可以使用如Andy Pope所提供的PatternFill Addin. 但是如果在2003使用VBA設計的程式怎麼辦? 這時可以使用 Selection.ShapeRange.Fill.Patterned 與 Selection.Fill.Patterned 的函數, 以index number的數值方式將圖案填入.如Selection.Fill.Patterned 33 就是將 indexnumber=33的pattern填入所選的範圍中

 

Pattern圖案在2003總共有48個(如圖),Excel 2007則為54個, 但前48個pattern與2003相同共容。需要範例程式可至http://www.seedstech.com.tw/d/modules/wfdownloads/ 下載本程式範例, 如此就解決了Excel 2007 Fill Pattern的問題.