excel row or cell color

Does anyone have any examples on how to change the color in excel

of a row or cell with VB.net. I used code from VB6, but it doesn't work

with VB.net

Thanks

Paul

 

Posted by: Paul Martz
Post date: 1/4/2006 12:58:00 AM

2 REPLIES

RE: excel row or cell color

 

Sub Main()

Dim objApp As New Microsoft.Office.Interop.Excel.Application

Dim objSheet As Microsoft.Office.Interop.Excel.Worksheet

Dim objRange As Microsoft.Office.Interop.Excel.Range

 

objApp = GetObject(, "Excel.Application")

objSheet = objApp.ActiveSheet

objRange = objSheet.Range("A1")

objRange.Interior.ColorIndex = 37

End Sub

 

 

Posted by: Jason Newell
Post date: 1/4/2006 1:22:07 AM

RE: excel row or cell color

Thanks Jason

Paul

 

Posted by: Paul Martz
Post date: 1/4/2006 11:41:21 PM