VB Code:
Function LoadListInExcel() As Boolean
LoadListInExcel= True
Set rstLoadRecord = New ADODB.Recordset
Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Add
Set xlsheet = xlApp.ActiveSheet
.
.
.
Call setBorder(xlsheet)
Call setColTitleWidth(xlsheet)
End function
Private Sub setBorder(worksheet As Excel.worksheet)
With worksheet
.cell...
.range...
end with
End Function
Private Sub setColTitleWidth(worksheet As Excel.worksheet)
If lstr <> Trim$(rstLoadRecord![Ready]) Then
'cut and paste heading
.Range("A5:P9").Select
[COLOR=Sienna]Selection.Copy[/COLOR]
NextRows = CStr(NextRows + 5)
lstrCellCopy = "A" & NextRows
.Range(lstrCellCopy).Select
ActiveSheet.Paste
NextRows = CStr(NextRows + 5)
End if
End Function
...sorry that i miss out those DIM ..
..Does it got smthing to do with instance..?