Yup.
You set the objects back to nothing (destroying them) before you ever use them in the code:
Dim oXL As excel.Application
Dim oWB As excel.Workbook
Dim oSheet As excel.Worksheet
Dim bolExist As Boolean
Dim strCell_Value As String
Dim i As Integer
Dim num_cells As Integer
Set oSheet = Nothing
Set oWB = Nothing
Set oXL = Nothing
You need to use them to do the reading or writing to excel BEFORE setting them to nothing. ;)
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215