O2003 - Custom Form - Adding Category Button

  • Thread starter srm
  • Start date Views 1,478
Status
Not open for further replies.
S

srm

I'm using O2003 and created a custom task form. I want to have access

to my master Category list like I do on the main task form.

I created a command button and used "cmdCategories" in the name field

entered the code below. When I try to use the button, I get an invalid

procedure or call in the "Set cmd" line.

Sub cmdCategories_Click()

Set ai = Item.Application.ActiveInspector

Set mb = ai.CommandBars.Item("Menu Bar")

Set cmd = mb.Controls("Edit").Controls("Categories...")

cmd.Execute

End Sub

Any suggestions would be appreciated?

Shawn
 
S

Sue Mosher [MVP]

Use the TaskItem.ShowCategoriesDialog method:

http://msdn.microsoft.com/en-us/library/aa210294.aspx

Sue Mosher

"srm" <srm@primatech.com> wrote in message

news:39c8a702-f005-475b-a0fc-f9e2988859c6@k17g2000yqh.googlegroups.com...
> I'm using O2003 and created a custom task form. I want to have access
> to my master Category list like I do on the main task form.

> I created a command button and used "cmdCategories" in the name field
> entered the code below. When I try to use the button, I get an invalid
> procedure or call in the "Set cmd" line.

> Sub cmdCategories_Click()
> Set ai = Item.Application.ActiveInspector
> Set mb = ai.CommandBars.Item("Menu Bar")
> Set cmd = mb.Controls("Edit").Controls("Categories...")
> cmd.Execute
> End Sub

> Any suggestions would be appreciated?

> Shawn
 
S

srm

On Dec 9, 9:07 am, "Sue Mosher [MVP]" <sue...@gmail.com> wrote:
> Use the TaskItem.ShowCategoriesDialog method:http://msdn.microsoft.com/en-us/library/aa210294.aspx

> > Sue Mosher
>    >      >    
> "srm" <s...@primatech.com> wrote in message

> news:39c8a702-f005-475b-a0fc-f9e2988859c6@k17g2000yqh.googlegroups.com...
>
> > I'm using O2003 and created a custom task form. I want to have access
> > to my master Category list like I do on the main task form.

>
> > I created a command button and used "cmdCategories" in the name field
> > entered the code below. When I try to use the button, I get an invalid
> > procedure or call in the "Set cmd" line.

>
> > Sub cmdCategories_Click()
> >   Set ai = Item.Application.ActiveInspector
> >   Set mb = ai.CommandBars.Item("Menu Bar")
> >   Set cmd = mb.Controls("Edit").Controls("Categories...")
> >   cmd.Execute
> > End Sub

>
> > Any suggestions would be appreciated?

>
> > Shawn


Sue:

Thank you.

Shawn
 
Status
Not open for further replies.
Top