I am writing this macro to start in IBM Reflection and go to Excel to get info from a list and input it into a Reflection Session. And once its done it will move down one cell to the next one and start over. But I am getting this error message when I try to run the macro.
"Method or data member not found"
And it singles out this part of the macro.
.Sheets
Here is the full macro in case you need it.
Dim CellContents As String
Dim LocationCount As Integer
Dim ExcelApp As Excel.Application
Dim ExcelWorkbook As Excel.Worksheet
Set ExcelApp = New Excel.Application
Set ExcelWorkbook = ExcelApp.Workbooks.Open("R:\My Documents\Location Codes To Delete Rates.xls")
LocationCount = 2
StartPos = ExcelWorkbook.Sheets("Sheet1").Range("A & LocationCount")
If StartPos = ExcelWorkbook.Sheets("Sheet1").Range("A & LocationCount") Then
Do While CellContents <> ""
.RunMacro "NewMacros.Location_Code_Input", ""
Let LocationCount = LocationCount + 1
Loop
End If
What am I doing wrong?
"Method or data member not found"
And it singles out this part of the macro.
.Sheets
Here is the full macro in case you need it.
Dim CellContents As String
Dim LocationCount As Integer
Dim ExcelApp As Excel.Application
Dim ExcelWorkbook As Excel.Worksheet
Set ExcelApp = New Excel.Application
Set ExcelWorkbook = ExcelApp.Workbooks.Open("R:\My Documents\Location Codes To Delete Rates.xls")
LocationCount = 2
StartPos = ExcelWorkbook.Sheets("Sheet1").Range("A & LocationCount")
If StartPos = ExcelWorkbook.Sheets("Sheet1").Range("A & LocationCount") Then
Do While CellContents <> ""
.RunMacro "NewMacros.Location_Code_Input", ""
Let LocationCount = LocationCount + 1
Loop
End If
What am I doing wrong?