hi all,
i have a little problem, probably just syntax error or something but i cant figure this out.
i want to select a few adjacent cells in a row.
i cant use xlToRight as it effects some formatting later on.
so what i want is something like this ( but that works)
Sub Macro4()
' Macro4 Macro
' Macro recorded 29.08.2003
Dim ColumnOffset As Integer
ColumnOffset = 3 'Not always 3
Range("G14"
.Select
Range(Selection, Selection.End(ActiveCell.Offset(0, ColumnOffset))).Select 'problem with this line
With Selection.Interior 'Interior colour black
.ColorIndex = 1
.Pattern = xlSolid
End With
Selection.Font.ColorIndex = 2 'White Text
End Sub
the problem is on the line
Range(Selection, Selection.End(ActiveCell.Offset(0, ColumnOffset))).Select
im not too sure exactly how to write this
any help or suggestions would be appreciated. Thanks
i have a little problem, probably just syntax error or something but i cant figure this out.
i want to select a few adjacent cells in a row.
i cant use xlToRight as it effects some formatting later on.
so what i want is something like this ( but that works)
Sub Macro4()
' Macro4 Macro
' Macro recorded 29.08.2003
Dim ColumnOffset As Integer
ColumnOffset = 3 'Not always 3
Range("G14"
Range(Selection, Selection.End(ActiveCell.Offset(0, ColumnOffset))).Select 'problem with this line
With Selection.Interior 'Interior colour black
.ColorIndex = 1
.Pattern = xlSolid
End With
Selection.Font.ColorIndex = 2 'White Text
End Sub
the problem is on the line
Range(Selection, Selection.End(ActiveCell.Offset(0, ColumnOffset))).Select
im not too sure exactly how to write this
any help or suggestions would be appreciated. Thanks