I am using the following code to set my current worksheet. When I type WS = WB I do not get the Excel information for WB.
What am I doing wrong?

The following is the code I am using:

Dim App As Object
Dim WB As Object
Dim xlws As Object
Dim i As Integer = 5
Dim x As Integer

App = CreateObject("Excel.Application")
WB = App.Workbooks.Open("C:\myfile.xls")

I am using Excel 2000 and have the import Excel statement at the top. Why is it not working.

Thanks