Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some code that formats a spreadsheet. A user running Excel
2003 gets a runtime error on the ".TintAndShade" statement below. I do not get an error. Could this be related to some Reference I need to set programmatically? I took this code fragment from a recorded macro. With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin The complete subroutine is shown below. Thanks, Alan Sub GreyGridlines() ' ' This subroutine adds light grey gridlines to selected ' columns of the output spreadsheet ' With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With End Sub The way this is called is by this subroutine: Sub SetCellFormats(CmdWB As Workbook, DataWB As Workbook) ' ' This subroutine modifies the format of the cells in Rows ' A through P of the output spreadsheet '' Dim i As Integer, DataRowCount As Integer Dim switch As Boolean, MyFont As Font ' Select the columns to modify Columns("A:P").Select ' Add light grey gridlines GreyGridlines . . . |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
TintAndShade is not a property of the Borders collection object in xl2003.
He has the option of Color or ColorIndex. "Alan" wrote: I have some code that formats a spreadsheet. A user running Excel 2003 gets a runtime error on the ".TintAndShade" statement below. I do not get an error. Could this be related to some Reference I need to set programmatically? I took this code fragment from a recorded macro. With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin The complete subroutine is shown below. Thanks, Alan Sub GreyGridlines() ' ' This subroutine adds light grey gridlines to selected ' columns of the output spreadsheet ' With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .TintAndShade = -0.14996795556505 .Weight = xlThin End With End Sub The way this is called is by this subroutine: Sub SetCellFormats(CmdWB As Workbook, DataWB As Workbook) ' ' This subroutine modifies the format of the cells in Rows ' A through P of the output spreadsheet '' Dim i As Integer, DataRowCount As Integer Dim switch As Boolean, MyFont As Font ' Select the columns to modify Columns("A:P").Select ' Add light grey gridlines GreyGridlines . . . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks! Alan
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with .TintAndShade | Excel Programming | |||
.TintAndShade under Excel2003 | Excel Programming | |||
runtime Error '424' using Application.Selection | Excel Programming | |||
Selection.Borders and replace with new colour procedure | Excel Programming |