473,327 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Scope of an Imports statement

I was doing some testing of the effect of Option Strict on particular Word
VBA statements.

So I created a Form, the events of which called Subs in separate Modules.
Each Module is in a separate file so I can have a different Option Strict in
each.

I then noticed that I had to include an identical Imports statement in each
of the 3 files.

Is there a way to give an Imports statement the scope of the Project?
--
http://www.standards.com/; See Howard Kaikow's web site.
Nov 21 '05 #1
3 949
Howard,

"Howard Kaikow" <ka****@standards.com> schrieb:
Is there a way to give an Imports statement the scope of the Project?


In the project properties you can define project-wide imports.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
"Howard Kaikow" <ka****@standards.com> wrote in message news:<Ok**************@TK2MSFTNGP12.phx.gbl>...
I was doing some testing of the effect of Option Strict on particular Word
VBA statements.

So I created a Form, the events of which called Subs in separate Modules.
Each Module is in a separate file so I can have a different Option Strict in
each.

I then noticed that I had to include an identical Imports statement in each
of the 3 files.

Is there a way to give an Imports statement the scope of the Project?


Yes, if you are using Visual Studio.NET, show the properties of the
project, go to 'Common properties' -> 'Imports' and add one or more
project imports.
Anyway, projectwide imports is an option of the vbc compiler and can
be set from command line.
Nov 21 '05 #3
Thanx.

I should have noticed that.

--
http://www.standards.com/; See Howard Kaikow's web site.
"Howard Kaikow" <ka****@standards.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
I was doing some testing of the effect of Option Strict on particular Word
VBA statements.

So I created a Form, the events of which called Subs in separate Modules.
Each Module is in a separate file so I can have a different Option Strict in each.

I then noticed that I had to include an identical Imports statement in each of the 3 files.

Is there a way to give an Imports statement the scope of the Project?
--
http://www.standards.com/; See Howard Kaikow's web site.

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: pembed2003 | last post by:
Hi all, I am reading the book "C How to Program" and in the chapter where it discuss scope rule, it says there are four scopes for a variable: function scope file scope block scope...
8
by: Howard Kaikow | last post by:
I got bored today, so I decided to rewrite the code in KB article 316383 to decrease the number of object references. This resulted in a number of nested With ... End With. The original code had...
4
by: Jeff Jarrell | last post by:
I am not really there yet with namespaces. I have a "common.dll" that is referenced from another project. now in the consuming project, source file to i'd like to have a "imports common". ...
6
by: Mike | last post by:
Hi, I've two projects in one solution a windows and web project and I would like to get access to the windows classes (namespaces)by using the Imports statement in the web project but I can't see...
4
by: Mike W | last post by:
I have a class that requires the Imports System.IO statement to function properly. I intend on reusing this code in the future. I have another class in the project also need the system.io...
7
by: pcnerd | last post by:
In Java I can use, for example, " Imports java.util.* ". Can I use, for example, " Imports System.* " instead of several different "Imports" statements? Thank you. David
3
by: namewitheldbyrequest | last post by:
"The XML element 'EnableTheming' from namespace 'http://tempuri.org/' is already present in the current scope" I created a Web Service: I imported System.Data.SqlClient so I could access SQL...
1
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause...
5
by: kimiraikkonen | last post by:
Hello, I want to ask about "imports" statement. Some projects must be inserted with "imports xxxx" statements before beginning coding. But how do i know when to use or do i have to use "imports"...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.