By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

Excel InterOp

P: n/a
I keep getting this error : PasteSpecial method of the
worksheet class faild with this code :

Public Sub runtest()
Dim f1 As Form1
Dim xl As New Excel.Application()
Dim dataFile As New Excel.Worksheet()
Dim wks As New Excel.Worksheet()
Dim s As String = code.DealListFile
Dim selection As Excel.Range


wks = CType(xl.Workbooks.Open(filename).Worksheets.Item
(1), Excel.Worksheet)

xl.Visible = True
With dataFile
dataFile = CType(xl.Workbooks.Add.Worksheets.Item
("Sheet1"), Excel.Worksheet)


PLEASE HELP, i find any work with actually "touching xl"
crashes, what is wrong with this thing?
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.