When I create a macro in Excel 2010, I have this code:
So I transfer it to my VB.NET app so it looks like this:
All red Excel constants give me errors - Public member 'xlContinous' on type 'ApplicationClass' not found. Even if I try:
[tt]
.LineStyle = [blue]xlApp.[/blue]xlContinuous
[/tt]
How can I retrieve Excel constants from Excel?
Have fun.
---- Andy
Code:
With Range("A1:B2").Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
So I transfer it to my VB.NET app so it looks like this:
Code:
Imports MyExcel = Microsoft.Office.Interop.Excel
Dim xlApp As New MyExcel.Application
Dim xlBook As MyExcel.Workbook = xlApp.Workbooks.Add(System.Reflection.Missing.Value)
Dim xlSheet As MyExcel.Worksheet = Nothing
With xlApp
With .Range("A1:B2").Borders([red]xlEdgeLeft[/red])
.LineStyle = [red]xlContinuous[/red]
.ColorIndex = 0
.TintAndShade = 0
.Weight = [red]xlThin[/red]
End With
End With
All red Excel constants give me errors - Public member 'xlContinous' on type 'ApplicationClass' not found. Even if I try:
[tt]
.LineStyle = [blue]xlApp.[/blue]xlContinuous
[/tt]
How can I retrieve Excel constants from Excel?
Have fun.
---- Andy