Hi, Kadir.
Here's a sample I made for you.
Try this!
Sub Test()
Dim rng As Range, MyRct As Shape
Set rng = Application.InputBox("Please Select Range", Type:=8)
With rng
Set MyRct = ActiveSheet.Shapes.AddShape(1, .Left, .Top, .Width, .Height)
End With
End Sub
Thanks Colo,
How should I modify this macro if I am extracting range info as row, column inexes?
Thanks Colo,
How should I modify this macro if I am extracting range info as row, column indexes?
OK. I managed to do it using:
Set rng = Range(Cells(i, j), Cells(n, m))
Now I need to color it. Working on it.
Use the Interior.ColorIndex property (NT)
Juan! Thank you for your help.
Hi Kadir.
Sub Test2()
Dim rng As Range, MyRct As Shape
Dim i As Integer, j As Integer, n As Integer, m As Integer
i = 1: j = 1: n = 5: m = 5
Set rng = Range(Cells(i, j), Cells(n, m))
With rng
Set MyRct = ActiveSheet.Shapes.AddShape(1, .Left, .Top, .Width, .Height)
'Like This...Change Index you want
MyRct.Fill.ForeColor.SchemeColor = 12
MyRct.Line.ForeColor.SchemeColor = 23
End With
End Sub