im not understanding why some of the code below works fine and some gives an error
These work fine
.PageSetup
.Borders
.Range
These give error "Option strict on disallows late binding"
.Cells
.Rows
.Columns
what is the difference???
example...
Code:dim oExcel As Excel.Application dim oBook As Excel.Workbook dim oSheet As Excel.Worksheet With oSheet 'WORKING FINE .PageSetup.Zoom = 65 .Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeTop).LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous .Range("A27").Value = "Hello" 'GIVING ERROR .Cells(1, 1).value = "Hello" .Rows("60:60").Font.Bold = True .Columns("A:Z").ColumnWidth = 8.0 End With




Reply With Quote