Hi,
I want to place a horizontal line in Excel using VBA.Actually iam working with Excel object in VB.Iam able to insert a vertical line with some code but with other options iam not able to insert horizontal line.Can anyone please help me out with this.
Here is the code for the vertical line

Worksheets("Sheet1").Range("A1:G1").Borders(xlDiagonalUp).Color = RGB(255, 195, 0)

Also i want to insert page numbers in the footer like

Page i of n.

Using VBA can anyone tell me as what code to write to display the page numbers.

I will be very much thankful to you if you can give solution to these.

Thanks

Regards
Anil