Excel VBA 设置三维单元格区域的边框格式

如果要处理若干工作表上相同位置的单元格区域,可用 Array 函数选定两张或多张工作表。下例设置三维单元格区域的边框格式。 If you want to deal with some of the same location on the worksheet cell range, select the Array function can be used two or more worksheets. The following example sets the frame format of three-dimensional range of cells.Sub FormatSheets() Sheets(Array(“Sheet2”, “Sheet3”, “Sheet5”)).Select Range(“A1:H1”).Select Selection.Borders(xlBottom).LineStyle = xlDoubleEnd Sub 下例应用 FillAcrossSheets 方法,在活动工作簿中,将 Sheet2 上的单元格区域的格式和任何数据复制到该工作簿中所有工作表上的相应区域中。 The following example application FillAcrossSheets method, in the active workbook, the range of cells on Sheet2 any data format and copy all the worksheets in the workbook on the corresponding area.Sub FillAll() Worksheets(“Sheet2”).Range(“A1:H1”) _ .Borders(xlBottom).LineStyle = xlDouble Worksheets.FillAcrossSheets (Worksheets(“Sheet2”) _ .Range(“A1:H1”))End Sub
用最少的悔恨面对过去

Excel VBA 设置三维单元格区域的边框格式

相关文章:

你感兴趣的文章:

标签云: