Creating in VB in Project

J

Jozie True

First of all, thanks for everyones help regarding my
recent flow of questions. :)

Microsoft Visual Basic is in Microsoft Project 98, Im
assuming this is so that you can create and customize your
own forms and whatnot.

Is it possible to bring Project & Excel together in Visual
Basic? If so, how would I go about doing this? I have
time on my side but would like to know a starting point,
or if it is possible.

If not, then is it possible to create something similar to
an Excel workbook, where I can link a few pages of data
together that could lead into each other?

Thanks again for your time :)
-Jozie
 
J

Jan De Messemaeker

Hi Jozie,

I suppose you know how to go to, and to use, the Visual Basic Editor.

(Before you go on, make sure your installation has Visual Basic Help, which
is not included in the standard options when installing; re-install if
necessary, it is utterly useless to start VBA without the Help)

If you want to access Excel books from Project, in the Visual Basic Editor
click Tools, References, mark the checkbox for Microsoft Excel, OK.

Now find the icon for the Object Browser, click it
In the search window, type CreateObject. Figure out f.i. what to code to
open an instance of Excel

Once you have the object - say XLapp which is set to Excel.Application, you
can do anything you want in Excel for instance

Dim aRange as Excel.range

xlapp.workbooks.open TheAddress

Set arange=activesheet.cells(5,7).currentregion

etcetera...

Just one very very very important remark.
Do not try to access project's data via selection, cell, row,...
Use Project's objets such as tasks, resource, assignments, etc.

HTH


--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
 
J

Jozie True

Thanks!

Now, one question- this help you speak of, is it the
same 'Microsoft Visual Basic Help' found under the Help on
the top toolbar?
If not, I will re-install.

Thanks a lot for your help, I'll get started on it now, if
I run into any problems I will be sure to post them in the
newsgroup.

-- Jozie
 
J

Jan De Messemaeker

Hi Jozie,

Just to make sure.
Visual Basic Editor
Click Object Browser Icon
In the search window type fileclose (for instance)
Enter
Two line come up
Select one, then type the yellow question mark

A page should come up showing this

FileClose Method


Closes the active project.

Syntax

expression.FileClose(Save, NoAuto)

expression Optional. An expression that returns an Application object.

Save Optional Long. Can be one of the following PjSave constants:
pjDoNotSave, pjSave, or pjPromptSave. The default value is pjPromptSave for
new project files and projects that have changed since the last save.

NoAuto Optional Boolean. True if an Auto_Close macro is not run and the
Close event is not raised. The default value is False.

With an incomplete installation this page doesn't come up.
This is an illustration of how best to search for info on methods

HTH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
 
J

Jozie True

When I type in 'fileclose' I get the two lines, regardless
of which one I click on tyhen hit the yellow question mark
it just makes a 'ding' error noise. Being that thats what
it does, Im assuming its not installed?

When I click on the first line, it gives me
"Sub FileClose([Save As PjSaveType = pjPromptSave],
[NoAuto])
Member of MSProject.Application"

The second line
"Sub FileCloseAll([Save As PjSaveType = pjPromptSave])
Member of MSProject.Application

-- Jozie True
 
J

Jan De Messemaeker

Hi,

Yes, but as you can see from my example when the full VBA help is installed,
you can get much more on each of the methods.
I would give it a go.
HTH

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
Jozie True said:
When I type in 'fileclose' I get the two lines, regardless
of which one I click on tyhen hit the yellow question mark
it just makes a 'ding' error noise. Being that thats what
it does, Im assuming its not installed?

When I click on the first line, it gives me
"Sub FileClose([Save As PjSaveType = pjPromptSave],
[NoAuto])
Member of MSProject.Application"

The second line
"Sub FileCloseAll([Save As PjSaveType = pjPromptSave])
Member of MSProject.Application

-- Jozie True

-----Original Message-----
Hi Jozie,

Just to make sure.
Visual Basic Editor
Click Object Browser Icon
In the search window type fileclose (for instance)
Enter
Two line come up
Select one, then type the yellow question mark

A page should come up showing this

FileClose Method


Closes the active project.

Syntax

expression.FileClose(Save, NoAuto)

expression Optional. An expression that returns an Application object.

Save Optional Long. Can be one of the following PjSave constants:
pjDoNotSave, pjSave, or pjPromptSave. The default value is pjPromptSave for
new project files and projects that have changed since the last save.

NoAuto Optional Boolean. True if an Auto_Close macro is not run and the
Close event is not raised. The default value is False.

With an incomplete installation this page doesn't come up.
This is an illustration of how best to search for info on methods

HTH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
"Jozie True" <[email protected]> schreef in bericht


.
 
J

Jozie True

I reinstalled it, and then when I tried it, this is the
message I got.

"Cannot find the C:\PROGRAM FLES\COMMON FILES\MICROSOFT
SHARED\VBA\VEenLR3.HLP Help file. Check to see that the
file exists on your disk. If it doesn't, you need to
reinstall it."

Sorry to keep bugging you :)

-- Jozie

-----Original Message-----
Hi,

Yes, but as you can see from my example when the full VBA help is installed,
you can get much more on each of the methods.
I would give it a go.
HTH

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
"Jozie True" <[email protected]> schreef in bericht
When I type in 'fileclose' I get the two lines, regardless
of which one I click on tyhen hit the yellow question mark
it just makes a 'ding' error noise. Being that thats what
it does, Im assuming its not installed?

When I click on the first line, it gives me
"Sub FileClose([Save As PjSaveType = pjPromptSave],
[NoAuto])
Member of MSProject.Application"

The second line
"Sub FileCloseAll([Save As PjSaveType = pjPromptSave])
Member of MSProject.Application

-- Jozie True

-----Original Message-----
Hi Jozie,

Just to make sure.
Visual Basic Editor
Click Object Browser Icon
In the search window type fileclose (for instance)
Enter
Two line come up
Select one, then type the yellow question mark

A page should come up showing this

FileClose Method


Closes the active project.

Syntax

expression.FileClose(Save, NoAuto)

expression Optional. An expression that returns an Application object.

Save Optional Long. Can be one of the following
PjSave
constants:
pjDoNotSave, pjSave, or pjPromptSave. The default value is pjPromptSave for
new project files and projects that have changed since the last save.

NoAuto Optional Boolean. True if an Auto_Close macro
is
not run and the
Close event is not raised. The default value is False.

With an incomplete installation this page doesn't come up.
This is an illustration of how best to search for info
on
methods
HTH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
"Jozie True" <[email protected]> schreef in bericht
Thanks!

Now, one question- this help you speak of, is it the
same 'Microsoft Visual Basic Help' found under the
Help
on
the top toolbar?
If not, I will re-install.

Thanks a lot for your help, I'll get started on it
now,
if
I run into any problems I will be sure to post them
in
the
newsgroup.

-- Jozie
-----Original Message-----
Hi Jozie,

I suppose you know how to go to, and to use, the Visual
Basic Editor.

(Before you go on, make sure your installation has Visual
Basic Help, which
is not included in the standard options when installing;
re-install if
necessary, it is utterly useless to start VBA
without
the
Help)

If you want to access Excel books from Project, in the
Visual Basic Editor
click Tools, References, mark the checkbox for Microsoft
Excel, OK.

Now find the icon for the Object Browser, click it
In the search window, type CreateObject. Figure out f.i.
what to code to
open an instance of Excel

Once you have the object - say XLapp which is set to
Excel.Application, you
can do anything you want in Excel for instance

Dim aRange as Excel.range

xlapp.workbooks.open TheAddress

Set arange=activesheet.cells(5,7).currentregion

etcetera...

Just one very very very important remark.
Do not try to access project's data via selection, cell,
row,...
Use Project's objets such as tasks, resource,
assignments, etc.

HTH


--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
"Jozie True" <[email protected]> schreef in
bericht
First of all, thanks for everyones help regarding my
recent flow of questions. :)

Microsoft Visual Basic is in Microsoft Project 98, Im
assuming this is so that you can create and customize
your
own forms and whatnot.

Is it possible to bring Project & Excel together in
Visual
Basic? If so, how would I go about doing this? I have
time on my side but would like to know a starting point,
or if it is possible.

If not, then is it possible to create something similar
to
an Excel workbook, where I can link a few pages of data
together that could lead into each other?

Thanks again for your time :)
-Jozie



.



.


.
 
J

Jan De Messemaeker

Hi Jozie,

That beats me. Sure you installed custom, then selecting absolutely all
possible choices?

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
Jozie True said:
I reinstalled it, and then when I tried it, this is the
message I got.

"Cannot find the C:\PROGRAM FLES\COMMON FILES\MICROSOFT
SHARED\VBA\VEenLR3.HLP Help file. Check to see that the
file exists on your disk. If it doesn't, you need to
reinstall it."

Sorry to keep bugging you :)

-- Jozie

-----Original Message-----
Hi,

Yes, but as you can see from my example when the full VBA help is installed,
you can get much more on each of the methods.
I would give it a go.
HTH

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
"Jozie True" <[email protected]> schreef in bericht
When I type in 'fileclose' I get the two lines, regardless
of which one I click on tyhen hit the yellow question mark
it just makes a 'ding' error noise. Being that thats what
it does, Im assuming its not installed?

When I click on the first line, it gives me
"Sub FileClose([Save As PjSaveType = pjPromptSave],
[NoAuto])
Member of MSProject.Application"

The second line
"Sub FileCloseAll([Save As PjSaveType = pjPromptSave])
Member of MSProject.Application

-- Jozie True


-----Original Message-----
Hi Jozie,

Just to make sure.
Visual Basic Editor
Click Object Browser Icon
In the search window type fileclose (for instance)
Enter
Two line come up
Select one, then type the yellow question mark

A page should come up showing this

FileClose Method


Closes the active project.

Syntax

expression.FileClose(Save, NoAuto)

expression Optional. An expression that returns an
Application object.

Save Optional Long. Can be one of the following PjSave
constants:
pjDoNotSave, pjSave, or pjPromptSave. The default value
is pjPromptSave for
new project files and projects that have changed since
the last save.

NoAuto Optional Boolean. True if an Auto_Close macro is
not run and the
Close event is not raised. The default value is False.

With an incomplete installation this page doesn't come up.
This is an illustration of how best to search for info on
methods

HTH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
"Jozie True" <[email protected]> schreef in
bericht
Thanks!

Now, one question- this help you speak of, is it the
same 'Microsoft Visual Basic Help' found under the Help
on
the top toolbar?
If not, I will re-install.

Thanks a lot for your help, I'll get started on it now,
if
I run into any problems I will be sure to post them in
the
newsgroup.

-- Jozie
-----Original Message-----
Hi Jozie,

I suppose you know how to go to, and to use, the Visual
Basic Editor.

(Before you go on, make sure your installation has
Visual
Basic Help, which
is not included in the standard options when
installing;
re-install if
necessary, it is utterly useless to start VBA without
the
Help)

If you want to access Excel books from Project, in the
Visual Basic Editor
click Tools, References, mark the checkbox for
Microsoft
Excel, OK.

Now find the icon for the Object Browser, click it
In the search window, type CreateObject. Figure out
f.i.
what to code to
open an instance of Excel

Once you have the object - say XLapp which is set to
Excel.Application, you
can do anything you want in Excel for instance

Dim aRange as Excel.range

xlapp.workbooks.open TheAddress

Set arange=activesheet.cells(5,7).currentregion

etcetera...

Just one very very very important remark.
Do not try to access project's data via selection,
cell,
row,...
Use Project's objets such as tasks, resource,
assignments, etc.

HTH


--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
"Jozie True" <[email protected]> schreef in
bericht
First of all, thanks for everyones help regarding my
recent flow of questions. :)

Microsoft Visual Basic is in Microsoft Project 98, Im
assuming this is so that you can create and customize
your
own forms and whatnot.

Is it possible to bring Project & Excel together in
Visual
Basic? If so, how would I go about doing this? I
have
time on my side but would like to know a starting
point,
or if it is possible.

If not, then is it possible to create something
similar
to
an Excel workbook, where I can link a few pages of
data
together that could lead into each other?

Thanks again for your time :)
-Jozie



.



.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top