WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Populating a listbox or combo box in Visio 2003

 
   Home -> Office other -> General Discussions RSS
Next:  can you animate callout shapes in visio?  
Author Message
jayhankins

External


Since: Sep 04, 2007
Posts: 2



(Msg. 1) Posted: Tue Sep 04, 2007 8:33 pm
Post subject: Populating a listbox or combo box in Visio 2003
Archived from groups: microsoft>public>visio>general (more info?)

I am trying to add a forms 2.0 lisbox or combobox to a visio page. The
box will be populated with data that that comes from an other shape
eventually. The problem is that when I try to use the AddItem method
in a macro I get an object does not support this property or method
error. Here is the code I am trying:

"Sub addItemMacro()
Dim x
Dim index
Set myListBox = ActivePage.Shapes("Sheet.1")
For x = 1 To 5
index = myListBox.AddItem(x)
Next x
End Sub"


This code gives me a type mismatch with AddItem highlighted:

"Private Sub alarmListBox_Click()
Dim index
Dim x
For x = 1 To 10
index = alarmListBox.AddItem(x)
Next x
End Sub"

I am not very skilled at this sort of thing but I can usually muddle
through. However I can't seem to get this to work.

Thanks for your help

jph
Back to top
Login to vote
Chris Roth [MVP]

External


Since: Jul 17, 2006
Posts: 146



(Msg. 2) Posted: Wed Sep 05, 2007 8:39 pm
Post subject: Re: Populating a listbox or combo box in Visio 2003 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jay,

I've got an example in the the article "Combo Box Table of Contents" located
here: http://www.visguy.com/2006/11/08/combo-box-table-of-contents/

There's code listings in the article, and a downloadable Visio file that has
a combo box on the page, and VBA code behind it.

--
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
http://www.visguy.com/category/shapes
Visio programming info:
http://www.visguy.com/category/programming/
Other Visio resources:
http://www.visguy.com/visio-links/

wrote in message

>I am trying to add a forms 2.0 lisbox or combobox to a visio page. The
> box will be populated with data that that comes from an other shape
> eventually. The problem is that when I try to use the AddItem method
> in a macro I get an object does not support this property or method
> error. Here is the code I am trying:
>
> "Sub addItemMacro()
> Dim x
> Dim index
> Set myListBox = ActivePage.Shapes("Sheet.1")
> For x = 1 To 5
> index = myListBox.AddItem(x)
> Next x
> End Sub"
>
>
> This code gives me a type mismatch with AddItem highlighted:
>
> "Private Sub alarmListBox_Click()
> Dim index
> Dim x
> For x = 1 To 10
> index = alarmListBox.AddItem(x)
> Next x
> End Sub"
>
> I am not very skilled at this sort of thing but I can usually muddle
> through. However I can't seem to get this to work.
>
> Thanks for your help
>
> jph
>
Back to top
Login to vote
jayhankins

External


Since: Sep 04, 2007
Posts: 2



(Msg. 3) Posted: Thu Sep 06, 2007 5:19 am
Post subject: Re: Populating a listbox or combo box in Visio 2003 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 5, 5:39 am, "Chris Roth [MVP]" <visioguy [at] hotmail [dot]
com> wrote:
> Hi Jay,
>
> I've got an example in the the article "Combo Box Table of Contents" located
> here:http://www.visguy.com/2006/11/08/combo-box-table-of-contents/
>
> There's code listings in the article, and a downloadable Visio file that has
> a combo box on the page, and VBA code behind it.
>
> --
> Hope this helps,
>
> Chris Roth
> Visio MVP
>
> Free Visio shapes:
> http://www.visguy.com/category/shapes
> Visio programming info:
> http://www.visguy.com/category/programming/
> Other Visio resources:
> http://www.visguy.com/visio-links/
>
> wrote in message
>
>
>
>
>
> >I am trying to add a forms 2.0 lisbox or combobox to a visio page. The
> > box will be populated with data that that comes from an other shape
> > eventually. The problem is that when I try to use the AddItem method
> > in a macro I get an object does not support this property or method
> > error. Here is the code I am trying:
>
> > "Sub addItemMacro()
> > Dim x
> > Dim index
> > Set myListBox = ActivePage.Shapes("Sheet.1")
> > For x = 1 To 5
> > index = myListBox.AddItem(x)
> > Next x
> > End Sub"
>
> > This code gives me a type mismatch with AddItem highlighted:
>
> > "Private Sub alarmListBox_Click()
> > Dim index
> > Dim x
> > For x = 1 To 10
> > index = alarmListBox.AddItem(x)
> > Next x
> > End Sub"
>
> > I am not very skilled at this sort of thing but I can usually muddle
> > through. However I can't seem to get this to work.
>
> > Thanks for your help
>
> > jph- Hide quoted text -
>
> - Show quoted text -

The example that you linked to is very helpful. Are there any visio
programming books that cover more advanaced topics that you would
recommend?
Thanks for your help
Back to top
Login to vote
Chris Roth [MVP]

External


Since: Jul 17, 2006
Posts: 146



(Msg. 4) Posted: Thu Sep 06, 2007 11:00 pm
Post subject: Re: Populating a listbox or combo box in Visio 2003 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jay,

Regarding Visio programming books, here's my review of the newest:
http://www.visguy.com/2007/07/23/book-review-visualizing-information-w...-micros

And "Visio 2003 Developer's Survival Pack" - a long-time "Bible" for us
Visio-geeks!
(both books at the top of this page: http://www.visguy.com/visio-links/)

--
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
http://www.visguy.com/category/shapes
Visio programming info:
http://www.visguy.com/category/programming/
Other Visio resources:
http://www.visguy.com/visio-links/

wrote in message

> On Sep 5, 5:39 am, "Chris Roth [MVP]" <visioguy [at] hotmail [dot]
> com> wrote:
>> Hi Jay,
>>
>> I've got an example in the the article "Combo Box Table of Contents"
>> located
>> here:http://www.visguy.com/2006/11/08/combo-box-table-of-contents/
>>
>> There's code listings in the article, and a downloadable Visio file that
>> has
>> a combo box on the page, and VBA code behind it.
>>
>> --
>> Hope this helps,
>>
>> Chris Roth
>> Visio MVP
>>
>> Free Visio shapes:
>> http://www.visguy.com/category/shapes
>> Visio programming info:
>> http://www.visguy.com/category/programming/
>> Other Visio resources:
>> http://www.visguy.com/visio-links/
>>
>> wrote in message
>>
>>
>>
>>
>>
>> >I am trying to add a forms 2.0 lisbox or combobox to a visio page. The
>> > box will be populated with data that that comes from an other shape
>> > eventually. The problem is that when I try to use the AddItem method
>> > in a macro I get an object does not support this property or method
>> > error. Here is the code I am trying:
>>
>> > "Sub addItemMacro()
>> > Dim x
>> > Dim index
>> > Set myListBox = ActivePage.Shapes("Sheet.1")
>> > For x = 1 To 5
>> > index = myListBox.AddItem(x)
>> > Next x
>> > End Sub"
>>
>> > This code gives me a type mismatch with AddItem highlighted:
>>
>> > "Private Sub alarmListBox_Click()
>> > Dim index
>> > Dim x
>> > For x = 1 To 10
>> > index = alarmListBox.AddItem(x)
>> > Next x
>> > End Sub"
>>
>> > I am not very skilled at this sort of thing but I can usually muddle
>> > through. However I can't seem to get this to work.
>>
>> > Thanks for your help
>>
>> > jph- Hide quoted text -
>>
>> - Show quoted text -
>
> The example that you linked to is very helpful. Are there any visio
> programming books that cover more advanaced topics that you would
> recommend?
> Thanks for your help
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> General Discussions All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Help Forum Terms of Service |
  • Link to WUGNET |
  • IT Support