Hi,
I’m wondering if someone can provide some assistance with my export problem. I receive the following error when attempting to export data.
“Object doesn’t support this property or method”
I believe I declared all of my variables. What am I doing or not doing?
Here is the export code:
<BEGIN CODE>
Dim StrCriterion As String
Dim strDocName As String
Dim myXl As Object
Dim myWB As Object, mySHT As Object
'Open Excel report and clear existing data
Set myXl = CreateObject("Excel.Application")
Set myWB = myXl.Workbook.Open("C:\EXPORT_WO_Trouble_Ticket_Report.xls")
mySHT.Sheets("CRITICAL").UsedRange.ClearContents
myWB.Save
myXl.Quit
Set myXl = Nothing
<END CODE>
I’m wondering if someone can provide some assistance with my export problem. I receive the following error when attempting to export data.
“Object doesn’t support this property or method”
I believe I declared all of my variables. What am I doing or not doing?
Here is the export code:
<BEGIN CODE>
Dim StrCriterion As String
Dim strDocName As String
Dim myXl As Object
Dim myWB As Object, mySHT As Object
'Open Excel report and clear existing data
Set myXl = CreateObject("Excel.Application")
Set myWB = myXl.Workbook.Open("C:\EXPORT_WO_Trouble_Ticket_Report.xls")
mySHT.Sheets("CRITICAL").UsedRange.ClearContents
myWB.Save
myXl.Quit
Set myXl = Nothing
<END CODE>