|
View Full Version : running a macro in project
Steff 06-26-2007, 06:23 PM Next question... I know this is basic but...
I created a userform with a button to create and save a document...
Now I want to tie it to a macro button on the toolbar in the main project
but I can't seem to get the userform in the vba editor to a spot where the
main program can see it to tie it to a button... this seem very basic but I
am missing something.. any words of advice are welcome....
MSP Project Version via Macro 06-27-2007, 02:38 PM Steff,
I had the same problem, I am sure there are other ways to do this, but
here is how I did it.
I right clicked on the smart icon bar and then selected customize. Once I
got to the Customize panel I clicked the Commands tab, then selected New Menu
from the Categories list. Then I did a drag and drop from the Commands list
of the New Menu item and droped it on the action bar. I could then edit it
and name it what ever I wanted. At that point I had my ned menu drop down and
just needed to add my Macro to it. So I wen t back to the Customize->Commands
and selected All Macros from the Categories list. I them did a drag and drop
of my Macro to the new menu item on the action bar. At that point you can
give it a title and add cute little icons to it.
I hope this helps.
David
"Steff" wrote:
> Next question... I know this is basic but...
>
> I created a userform with a button to create and save a document...
>
> Now I want to tie it to a macro button on the toolbar in the main project
> but I can't seem to get the userform in the vba editor to a spot where the
> main program can see it to tie it to a button... this seem very basic but I
> am missing something.. any words of advice are welcome....
Steff 06-27-2007, 05:20 PM Hmmm... nope... the problem I have is that after I have created the macro...
it does not show up in the list of All Macros. So nothing there to drag and
drop. thanks though.
"MSP Project Version via Macro" wrote:
> Steff,
>
> I had the same problem, I am sure there are other ways to do this, but
> here is how I did it.
>
> I right clicked on the smart icon bar and then selected customize. Once I
> got to the Customize panel I clicked the Commands tab, then selected New Menu
> from the Categories list. Then I did a drag and drop from the Commands list
> of the New Menu item and droped it on the action bar. I could then edit it
> and name it what ever I wanted. At that point I had my ned menu drop down and
> just needed to add my Macro to it. So I wen t back to the Customize->Commands
> and selected All Macros from the Categories list. I them did a drag and drop
> of my Macro to the new menu item on the action bar. At that point you can
> give it a title and add cute little icons to it.
>
> I hope this helps.
>
> David
>
> "Steff" wrote:
>
> > Next question... I know this is basic but...
> >
> > I created a userform with a button to create and save a document...
> >
> > Now I want to tie it to a macro button on the toolbar in the main project
> > but I can't seem to get the userform in the vba editor to a spot where the
> > main program can see it to tie it to a button... this seem very basic but I
> > am missing something.. any words of advice are welcome....
MSP Project Version via Macro 06-27-2007, 05:40 PM Steff,
OK, yep had that same problem too. I created a user form and you are right
they don't show up on the macro selection. In the VB window, I had to create
a "Module" that called a function in the user form before it would show in
the macro list. Have included sample code below.
Sub Show_Audit_Form()
'Procedure Shows Audit Form
' Shortcut: CONTROL + M
frmAudit.Show
End Sub
Does that help?
David
"Steff" wrote:
> Hmmm... nope... the problem I have is that after I have created the macro...
> it does not show up in the list of All Macros. So nothing there to drag and
> drop. thanks though.
>
> "MSP Project Version via Macro" wrote:
>
> > Steff,
> >
> > I had the same problem, I am sure there are other ways to do this, but
> > here is how I did it.
> >
> > I right clicked on the smart icon bar and then selected customize. Once I
> > got to the Customize panel I clicked the Commands tab, then selected New Menu
> > from the Categories list. Then I did a drag and drop from the Commands list
> > of the New Menu item and droped it on the action bar. I could then edit it
> > and name it what ever I wanted. At that point I had my ned menu drop down and
> > just needed to add my Macro to it. So I wen t back to the Customize->Commands
> > and selected All Macros from the Categories list. I them did a drag and drop
> > of my Macro to the new menu item on the action bar. At that point you can
> > give it a title and add cute little icons to it.
> >
> > I hope this helps.
> >
> > David
> >
> > "Steff" wrote:
> >
> > > Next question... I know this is basic but...
> > >
> > > I created a userform with a button to create and save a document...
> > >
> > > Now I want to tie it to a macro button on the toolbar in the main project
> > > but I can't seem to get the userform in the vba editor to a spot where the
> > > main program can see it to tie it to a button... this seem very basic but I
> > > am missing something.. any words of advice are welcome....
Steff 06-27-2007, 10:22 PM Hmmmmm... generates a runtime error 424, object required...
I typed :
Sub Show_Pac_Create_Form()
'Procedure Shows Audit Form
frmPacCreate.Show
End Sub
Am I supposed to refer to the userform as the object I am calling in the
function or do I place another object in the userform that the function calls
to? I know I am dense but I find it hard to believe I am the first person to
ever try to use a user form in Project...
"MSP Project Version via Macro" wrote:
> Steff,
>
> OK, yep had that same problem too. I created a user form and you are right
> they don't show up on the macro selection. In the VB window, I had to create
> a "Module" that called a function in the user form before it would show in
> the macro list. Have included sample code below.
>
> Sub Show_Audit_Form()
> 'Procedure Shows Audit Form
> ' Shortcut: CONTROL + M
>
> frmAudit.Show
>
> End Sub
>
> Does that help?
>
> David
>
> "Steff" wrote:
>
> > Hmmm... nope... the problem I have is that after I have created the macro...
> > it does not show up in the list of All Macros. So nothing there to drag and
> > drop. thanks though.
> >
> > "MSP Project Version via Macro" wrote:
> >
> > > Steff,
> > >
> > > I had the same problem, I am sure there are other ways to do this, but
> > > here is how I did it.
> > >
> > > I right clicked on the smart icon bar and then selected customize. Once I
> > > got to the Customize panel I clicked the Commands tab, then selected New Menu
> > > from the Categories list. Then I did a drag and drop from the Commands list
> > > of the New Menu item and droped it on the action bar. I could then edit it
> > > and name it what ever I wanted. At that point I had my ned menu drop down and
> > > just needed to add my Macro to it. So I wen t back to the Customize->Commands
> > > and selected All Macros from the Categories list. I them did a drag and drop
> > > of my Macro to the new menu item on the action bar. At that point you can
> > > give it a title and add cute little icons to it.
> > >
> > > I hope this helps.
> > >
> > > David
> > >
> > > "Steff" wrote:
> > >
> > > > Next question... I know this is basic but...
> > > >
> > > > I created a userform with a button to create and save a document...
> > > >
> > > > Now I want to tie it to a macro button on the toolbar in the main project
> > > > but I can't seem to get the userform in the vba editor to a spot where the
> > > > main program can see it to tie it to a button... this seem very basic but I
> > > > am missing something.. any words of advice are welcome....
Jack Dahlgren 06-28-2007, 03:44 AM Should work. Where is the userform stored? In the project or the global? How
about the macro?
--
Jack Dahlgren
Project Blog: http://zo-d.com/blog
Macros: http://masamiki.com/project/macros.htm
"docendo discimus"
"Steff" <Steff@discussions.microsoft.com> wrote in message
news:64A31765-607B-49B9-8135-F463534FC5DE@microsoft.com...
> Hmmmmm... generates a runtime error 424, object required...
>
> I typed :
>
> Sub Show_Pac_Create_Form()
> 'Procedure Shows Audit Form
>
> frmPacCreate.Show
>
> End Sub
>
> Am I supposed to refer to the userform as the object I am calling in the
> function or do I place another object in the userform that the function
> calls
> to? I know I am dense but I find it hard to believe I am the first person
> to
> ever try to use a user form in Project...
>
> "MSP Project Version via Macro" wrote:
>
>> Steff,
>>
>> OK, yep had that same problem too. I created a user form and you are
>> right
>> they don't show up on the macro selection. In the VB window, I had to
>> create
>> a "Module" that called a function in the user form before it would show
>> in
>> the macro list. Have included sample code below.
>>
>> Sub Show_Audit_Form()
>> 'Procedure Shows Audit Form
>> ' Shortcut: CONTROL + M
>>
>> frmAudit.Show
>>
>> End Sub
>>
>> Does that help?
>>
>> David
>>
>> "Steff" wrote:
>>
>> > Hmmm... nope... the problem I have is that after I have created the
>> > macro...
>> > it does not show up in the list of All Macros. So nothing there to
>> > drag and
>> > drop. thanks though.
>> >
>> > "MSP Project Version via Macro" wrote:
>> >
>> > > Steff,
>> > >
>> > > I had the same problem, I am sure there are other ways to do this,
>> > > but
>> > > here is how I did it.
>> > >
>> > > I right clicked on the smart icon bar and then selected customize.
>> > > Once I
>> > > got to the Customize panel I clicked the Commands tab, then selected
>> > > New Menu
>> > > from the Categories list. Then I did a drag and drop from the
>> > > Commands list
>> > > of the New Menu item and droped it on the action bar. I could then
>> > > edit it
>> > > and name it what ever I wanted. At that point I had my ned menu drop
>> > > down and
>> > > just needed to add my Macro to it. So I wen t back to the
>> > > Customize->Commands
>> > > and selected All Macros from the Categories list. I them did a drag
>> > > and drop
>> > > of my Macro to the new menu item on the action bar. At that point you
>> > > can
>> > > give it a title and add cute little icons to it.
>> > >
>> > > I hope this helps.
>> > >
>> > > David
>> > >
>> > > "Steff" wrote:
>> > >
>> > > > Next question... I know this is basic but...
>> > > >
>> > > > I created a userform with a button to create and save a document...
>> > > >
>> > > > Now I want to tie it to a macro button on the toolbar in the main
>> > > > project
>> > > > but I can't seem to get the userform in the vba editor to a spot
>> > > > where the
>> > > > main program can see it to tie it to a button... this seem very
>> > > > basic but I
>> > > > am missing something.. any words of advice are welcome....
Steff 06-28-2007, 04:30 AM Found the problem! Whoo woo... I was being stupid... College was simply too
long ago... thanks for the help though..
Could it be a missing reference?
"Jack Dahlgren" wrote:
> Should work. Where is the userform stored? In the project or the global? How
> about the macro?
>
> --
> Jack Dahlgren
> Project Blog: http://zo-d.com/blog
> Macros: http://masamiki.com/project/macros.htm
> "docendo discimus"
>
>
> "Steff" <Steff@discussions.microsoft.com> wrote in message
> news:64A31765-607B-49B9-8135-F463534FC5DE@microsoft.com...
> > Hmmmmm... generates a runtime error 424, object required...
> >
> > I typed :
> >
> > Sub Show_Pac_Create_Form()
> > 'Procedure Shows Audit Form
> >
> > frmPacCreate.Show
> >
> > End Sub
> >
> > Am I supposed to refer to the userform as the object I am calling in the
> > function or do I place another object in the userform that the function
> > calls
> > to? I know I am dense but I find it hard to believe I am the first person
> > to
> > ever try to use a user form in Project...
> >
> > "MSP Project Version via Macro" wrote:
> >
> >> Steff,
> >>
> >> OK, yep had that same problem too. I created a user form and you are
> >> right
> >> they don't show up on the macro selection. In the VB window, I had to
> >> create
> >> a "Module" that called a function in the user form before it would show
> >> in
> >> the macro list. Have included sample code below.
> >>
> >> Sub Show_Audit_Form()
> >> 'Procedure Shows Audit Form
> >> ' Shortcut: CONTROL + M
> >>
> >> frmAudit.Show
> >>
> >> End Sub
> >>
> >> Does that help?
> >>
> >> David
> >>
> >> "Steff" wrote:
> >>
> >> > Hmmm... nope... the problem I have is that after I have created the
> >> > macro...
> >> > it does not show up in the list of All Macros. So nothing there to
> >> > drag and
> >> > drop. thanks though.
> >> >
> >> > "MSP Project Version via Macro" wrote:
> >> >
> >> > > Steff,
> >> > >
> >> > > I had the same problem, I am sure there are other ways to do this,
> >> > > but
> >> > > here is how I did it.
> >> > >
> >> > > I right clicked on the smart icon bar and then selected customize.
> >> > > Once I
> >> > > got to the Customize panel I clicked the Commands tab, then selected
> >> > > New Menu
> >> > > from the Categories list. Then I did a drag and drop from the
> >> > > Commands list
> >> > > of the New Menu item and droped it on the action bar. I could then
> >> > > edit it
> >> > > and name it what ever I wanted. At that point I had my ned menu drop
> >> > > down and
> >> > > just needed to add my Macro to it. So I wen t back to the
> >> > > Customize->Commands
> >> > > and selected All Macros from the Categories list. I them did a drag
> >> > > and drop
> >> > > of my Macro to the new menu item on the action bar. At that point you
> >> > > can
> >> > > give it a title and add cute little icons to it.
> >> > >
> >> > > I hope this helps.
> >> > >
> >> > > David
> >> > >
> >> > > "Steff" wrote:
> >> > >
> >> > > > Next question... I know this is basic but...
> >> > > >
> >> > > > I created a userform with a button to create and save a document...
> >> > > >
> >> > > > Now I want to tie it to a macro button on the toolbar in the main
> >> > > > project
> >> > > > but I can't seem to get the userform in the vba editor to a spot
> >> > > > where the
> >> > > > main program can see it to tie it to a button... this seem very
> >> > > > basic but I
> >> > > > am missing something.. any words of advice are welcome....
>
>
>
|
|
|