Hi people,

I wonder if I missing any rerfence or something?
anyway I am not able to use "Set" in my code example:

I have made following code:

Code:
Imports Microsoft.Office.Interop.Excel

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim xlApp As Excel.Application
Dim wb As Workbook
Dim ws As Worksheet


Set xlApp = New Excel.Application
Set wb = xlApp.Workbooks.Add 
Set ws = wb.Worksheets("Sheet1") 




end sub
end class
Could someone help me why?