|
-
Jul 11th, 2003, 04:44 PM
#1
Thread Starter
Fanatic Member
bug in .net?
Can someone do a quick test as there seems to be a bug I think?
open a new project using vb.net, now you have form1. Add the reference to excel 9.0
in a button click event you can type dim oexcel as new excel.application
this works fine.
Now delete form1 and add a new form. This time do the same as above. i.e. in the click event place the same code.
Do you get an error? if so why?
Thanks
-
Jul 11th, 2003, 06:18 PM
#2
Frenzied Member
What is the error you are getting??
-
Jul 11th, 2003, 06:20 PM
#3
Thread Starter
Fanatic Member
e
The error is excel.application is not defined
As if there is noreference to the excel library. But there is.
This is very strange and I can not figure it out why it is happening.
-
Jul 11th, 2003, 07:06 PM
#4
Sleep mode
What VS.NET version you are talking about ?
-
Jul 11th, 2003, 09:19 PM
#5
Frenzied Member
This is not a bug. Whenever you add a new reference to your project, you have to place a using or imports statement at the top of the form you want to use that reference in. So if you added a reference to the using Microsoft.Office.Core object, at the top of the form, you would put imports using Microsoft.Office.Core or you can just use the fully qualified name.
Last edited by DevGrp; Jul 12th, 2003 at 11:55 AM.
-
Jul 12th, 2003, 03:53 AM
#6
Thread Starter
Fanatic Member
currently there is a reference to excel but there is no imports microsoft.office.core on the top. And it still works
??
-
Jul 12th, 2003, 05:34 AM
#7
Frenzied Member
I did'nt mean 'that' reference. That was just an example.
-
Jul 12th, 2003, 10:30 AM
#8
Sleep mode
Originally posted by fmardani
currently there is a reference to excel but there is no imports microsoft.office.core on the top. And it still works
??
Yes , it can still work . Imports and using (in C#) is not important . It's only a way to shorten function call or sub .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|