G
Guest
Hello
I have a macro that uses the Address property but right now its going up to
range (a1:k1) copying the formatting (yellow color) and pasting it into my
activecell.address. Below is what ive been using:
Sub Add_Truck_5()
Dim S
Selection.EntireRow.Insert
S = ActiveCell.Address
Application.Goto Reference:="R1C1"
Range("A1:K1").Select
Selection.Copy
Application.Goto Reference:=ActiveSheet.Range(S), Scroll:=False
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End Sub
(A1:K1 is formatted to yellow color with some text in A1)
What I want to do now is ignore copying from (a1:k1) but use the same
principal that what ever row I place my cursor in Column A
(activecell.address) is to paint over to column K in that row and color it.
He4Giv (Dick)
I have a macro that uses the Address property but right now its going up to
range (a1:k1) copying the formatting (yellow color) and pasting it into my
activecell.address. Below is what ive been using:
Sub Add_Truck_5()
Dim S
Selection.EntireRow.Insert
S = ActiveCell.Address
Application.Goto Reference:="R1C1"
Range("A1:K1").Select
Selection.Copy
Application.Goto Reference:=ActiveSheet.Range(S), Scroll:=False
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End Sub
(A1:K1 is formatted to yellow color with some text in A1)
What I want to do now is ignore copying from (a1:k1) but use the same
principal that what ever row I place my cursor in Column A
(activecell.address) is to paint over to column K in that row and color it.
He4Giv (Dick)