Hi all ,
Im using the following piece of code in MS Excel:
' Declare an object variable to hold the object
' reference. Dim as Object causes late binding.
Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet", "RB-COMPUTER")
' Make Excel visible through the Application object.
ExcelSheet.Application.Visible = True
' Place some text in the first cell of the sheet.
ExcelSheet.Application.Cells(1, 1).Value = "This is column A, row 1"
' Save the sheet to C:\test.xls directory.
ExcelSheet.SaveAs "C:\TEST.XLS"
' Close Excel with the Quit method on the Application object.
ExcelSheet.Application.Quit
' Release the object variable.
Set ExcelSheet = Nothing
...Which you can tell is straight out of the help file.
The problem is that I get an error on the following line of code:
Set ExcelSheet = CreateObject("Excel.Sheet", "RB-COMPUTER")
The error reads: "Run time error '462'. The remote server machine does not exist or is unavailable"
Now, I have a network setup between my PC and the other PC called "RB-COMPUTER".
Where am i going wrong? Please help.
Im using the following piece of code in MS Excel:
' Declare an object variable to hold the object
' reference. Dim as Object causes late binding.
Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet", "RB-COMPUTER")
' Make Excel visible through the Application object.
ExcelSheet.Application.Visible = True
' Place some text in the first cell of the sheet.
ExcelSheet.Application.Cells(1, 1).Value = "This is column A, row 1"
' Save the sheet to C:\test.xls directory.
ExcelSheet.SaveAs "C:\TEST.XLS"
' Close Excel with the Quit method on the Application object.
ExcelSheet.Application.Quit
' Release the object variable.
Set ExcelSheet = Nothing
...Which you can tell is straight out of the help file.
The problem is that I get an error on the following line of code:
Set ExcelSheet = CreateObject("Excel.Sheet", "RB-COMPUTER")
The error reads: "Run time error '462'. The remote server machine does not exist or is unavailable"
Now, I have a network setup between my PC and the other PC called "RB-COMPUTER".
Where am i going wrong? Please help.