<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Combo Box Table of Contents</title>
	<atom:link href="http://www.visguy.com/2006/11/08/combo-box-table-of-contents/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/</link>
	<description>Shapes, Stencils, Drawings Templates, Tutorials, Tips &#38; Developer Info for Microsoft Visio</description>
	<lastBuildDate>Fri, 10 Feb 2012 17:20:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Nick</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-33136</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 25 Jan 2012 10:04:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-33136</guid>
		<description>This code for a Table of Contents works fine. Thanks!
I want to add an index to each page though; I have approximately 40 pages and I want to switch between these pages. Several pages contain commandbuttons and I have to paste the codes of the indexes between the codes of the CommandButtons. 

This is the code (with at the end the CommandButtons) and this works, but when I add a new Combobox on another page, the codes becomes complicated and do interfere. How can I avoid that multiple codes (for the Comboboxes) interfere (with the commandbuttons), when I use this code for the ComboBoxes. Which command lines do I need to add (End sub, end function)?


&#039;// Combo Box Table of Contents
&#039;// Visio Guy
&#039;// http://www.visguy.com
&#039;// November 8th, 2006

&#039;// A variable for tracking pages that are
&#039;// about to be deleted.
Private m_deletedPageName As String

&#039;// This flag stops the code from jumping back
&#039;// to the index page every time the combo box
&#039;// is updated.
Private m_editingList As Boolean




Private Sub Document_RunModeEntered(ByVal doc As IVDocument)
    
  &#039;// This event fires when you click the
  &#039;// run-mode/design-mode button on the
  &#039;// Developer Toolbar, as well as when
  &#039;// this document gets opened or created
  &#039;// (created = a copy is opened)
  
  Call m_updatePageList

End Sub

Private Sub Document_BeforePageDelete(ByVal Page As IVPage)
  
  &#039;// Since this event fires before the page
  &#039;// is actually gone, we&#039;ll save it&#039;s name
  &#039;// so that m_updatePageList can ignore it.
  
  m_deletedPageName = Page.Name
  
  Call m_updatePageList
  
  &#039;// Reset m_deletedPageName to nothing:
  m_deletedPageName = vbNullString
  
End Sub

Private Sub Document_PageAdded(ByVal Page As IVPage)
  
  Call m_updatePageList

End Sub

Private Sub Document_PageChanged(ByVal Page As IVPage)
  
  &#039;// Occurs when page-name or background is changed.
  Call m_updatePageList
  
End Sub

Private Sub cmbPages_Change()

  If m_editingList Then Exit Sub
  
  &#039;// Switch the active window&#039;s page
  &#039;// to correspond to the user&#039;s choice
  &#039;// in the combo-box. Do nothing if there&#039;s
  &#039;// an error (i.e. the user types in a bad
  &#039;// page name)
  
  On Error GoTo Err
  
  ActiveWindow.Page = cmbPages.Text
  
  Exit Sub
  
Err:
  
End Sub

Private Sub m_updatePageList()

  m_editingList = True

  &#039;// Update the combo-box with a list of
  &#039;// all foreground pages in this document.
    
  Dim collPgs As Collection
  Dim sPageName As Variant
  
  Set collPgs = m_getPageList()
  cmbPages.Clear
  
  &#039;// Add all pages in collPgs, except a page
  &#039;// that might have just been deleted. Such
  &#039;// a page is stored in m_deletedPageNameName.
  
  For Each sPageName In collPgs
    If (StrComp(sPageName, m_deletedPageName, _
        vbTextCompare)  0) Then
      Call cmbPages.AddItem(sPageName)
    End If
  Next
  
  cmbPages.Text = cmbPages.ContainingPage.Name
        
  m_editingList = False
  
End Sub


Private Function m_getPageList() As Collection

  &#039;// Return a collection of all foreground
  &#039;// page names in this document.

  Dim collPgs As New Collection
  Dim pg As Visio.Page
  
  For Each pg In ThisDocument.Pages
  
    &#039;// Add non-background pages to the list:
    If Not (pg.Background) Then
      Call collPgs.Add(pg.Name)
    End If
  
  Next
  
  &#039;// Return the collection-list of page names:
  Set m_getPageList = collPgs
    
End Function


Private Sub CommandButton1_Click()
UserForm2.Show
End Sub</description>
		<content:encoded><![CDATA[<p>This code for a Table of Contents works fine. Thanks!<br />
I want to add an index to each page though; I have approximately 40 pages and I want to switch between these pages. Several pages contain commandbuttons and I have to paste the codes of the indexes between the codes of the CommandButtons. </p>
<p>This is the code (with at the end the CommandButtons) and this works, but when I add a new Combobox on another page, the codes becomes complicated and do interfere. How can I avoid that multiple codes (for the Comboboxes) interfere (with the commandbuttons), when I use this code for the ComboBoxes. Which command lines do I need to add (End sub, end function)?</p>
<p>&#8216;// Combo Box Table of Contents<br />
&#8216;// Visio Guy<br />
&#8216;// <a  href="http://www.visguy.com" rel="nofollow">http://www.visguy.com</a><br />
&#8216;// November 8th, 2006</p>
<p>&#8216;// A variable for tracking pages that are<br />
&#8216;// about to be deleted.<br />
Private m_deletedPageName As String</p>
<p>&#8216;// This flag stops the code from jumping back<br />
&#8216;// to the index page every time the combo box<br />
&#8216;// is updated.<br />
Private m_editingList As Boolean</p>
<p>Private Sub Document_RunModeEntered(ByVal doc As IVDocument)</p>
<p>  &#8216;// This event fires when you click the<br />
  &#8216;// run-mode/design-mode button on the<br />
  &#8216;// Developer Toolbar, as well as when<br />
  &#8216;// this document gets opened or created<br />
  &#8216;// (created = a copy is opened)</p>
<p>  Call m_updatePageList</p>
<p>End Sub</p>
<p>Private Sub Document_BeforePageDelete(ByVal Page As IVPage)</p>
<p>  &#8216;// Since this event fires before the page<br />
  &#8216;// is actually gone, we&#8217;ll save it&#8217;s name<br />
  &#8216;// so that m_updatePageList can ignore it.</p>
<p>  m_deletedPageName = Page.Name</p>
<p>  Call m_updatePageList</p>
<p>  &#8216;// Reset m_deletedPageName to nothing:<br />
  m_deletedPageName = vbNullString</p>
<p>End Sub</p>
<p>Private Sub Document_PageAdded(ByVal Page As IVPage)</p>
<p>  Call m_updatePageList</p>
<p>End Sub</p>
<p>Private Sub Document_PageChanged(ByVal Page As IVPage)</p>
<p>  &#8216;// Occurs when page-name or background is changed.<br />
  Call m_updatePageList</p>
<p>End Sub</p>
<p>Private Sub cmbPages_Change()</p>
<p>  If m_editingList Then Exit Sub</p>
<p>  &#8216;// Switch the active window&#8217;s page<br />
  &#8216;// to correspond to the user&#8217;s choice<br />
  &#8216;// in the combo-box. Do nothing if there&#8217;s<br />
  &#8216;// an error (i.e. the user types in a bad<br />
  &#8216;// page name)</p>
<p>  On Error GoTo Err</p>
<p>  ActiveWindow.Page = cmbPages.Text</p>
<p>  Exit Sub</p>
<p>Err:</p>
<p>End Sub</p>
<p>Private Sub m_updatePageList()</p>
<p>  m_editingList = True</p>
<p>  &#8216;// Update the combo-box with a list of<br />
  &#8216;// all foreground pages in this document.</p>
<p>  Dim collPgs As Collection<br />
  Dim sPageName As Variant</p>
<p>  Set collPgs = m_getPageList()<br />
  cmbPages.Clear</p>
<p>  &#8216;// Add all pages in collPgs, except a page<br />
  &#8216;// that might have just been deleted. Such<br />
  &#8216;// a page is stored in m_deletedPageNameName.</p>
<p>  For Each sPageName In collPgs<br />
    If (StrComp(sPageName, m_deletedPageName, _<br />
        vbTextCompare)  0) Then<br />
      Call cmbPages.AddItem(sPageName)<br />
    End If<br />
  Next</p>
<p>  cmbPages.Text = cmbPages.ContainingPage.Name</p>
<p>  m_editingList = False</p>
<p>End Sub</p>
<p>Private Function m_getPageList() As Collection</p>
<p>  &#8216;// Return a collection of all foreground<br />
  &#8216;// page names in this document.</p>
<p>  Dim collPgs As New Collection<br />
  Dim pg As Visio.Page</p>
<p>  For Each pg In ThisDocument.Pages</p>
<p>    &#8216;// Add non-background pages to the list:<br />
    If Not (pg.Background) Then<br />
      Call collPgs.Add(pg.Name)<br />
    End If</p>
<p>  Next</p>
<p>  &#8216;// Return the collection-list of page names:<br />
  Set m_getPageList = collPgs</p>
<p>End Function</p>
<p>Private Sub CommandButton1_Click()<br />
UserForm2.Show<br />
End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-29157</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 16 Dec 2011 19:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-29157</guid>
		<description>A ComboBox is good but I prefer the following method. Plus you will find the above script fails since it has incorrect sub functions. IE. the private sub functions need to be &quot;dim&quot; rather than Private. Moving on. I think the below script will satisfy the needs of nearly anyone trying to automate the creation of a Table of Contents in Microsoft Visio. I found the base for this script after scouring the internet for a concise, succint, and straight forward self help article that is easy to understand and implement. I found a few ways to improve the script and I was unable to retrieve the name of the original author but at any rate; here ya go.

First, inside the Visio Document hit &quot;Alt F11&quot; or click Tools&gt; Macros&gt; Visual Basic Editor. Either way you get there, once inside the VB Editor Click Insert&gt; Module. Input the following text:

Option Explicit

Sub TableofContents()

&#039;// Creates a shape for each page on the first page
&#039;// Adds a Double-Click GoTo link for each page.

Dim PageObj     As Visio.Page
Dim TOCEntry    As Visio.Shape
Dim CellObj     As Visio.Cell
Dim Posy        As Double
Dim PageCnt     As Double

&#039;// The below event creates a shape only for the purpose
&#039;// of being deleted. Without this the script would fail.

Set TOCEntry = ActiveDocument.Pages(1).DrawRectangle(1, Posy, 4, Posy + 0.25)

ActiveWindow.SelectAll
Application.ActiveWindow.Selection.Delete

&#039;// ActiveDocument.Pages.Count gives the number of pages

PageCnt = 0

For Each PageObj In Activedocument.Pages
     If PageObj.Background = False Then PageCnt = PageCnt + 1
Next

&#039;// Loops through pages.

For Each PageObj.Background = False Then &#039; Only Foreground pages

&#039;// Positions the page entries.

Posy = (PageCnt - PageObj.Index) / 4+ 1

&#039;// Creates rectangle shape for each page entry.

Set TOCEntry = ActiveDocument.Pages(1).DrawRectangle(1, Posy, 4, Posy + 0.25)

&#039;// Inputs page name inside rectangle.

TOCEntry.text = PageObj.Name

&#039;// Add link pointing to the Page when double-clicking rectangle.

Set CellObj = TOCEntry.CellsSRC(visSectionObject, visRowEvent, visEvtCellDblClick) &#039; Start

CellObj.Formula = &quot;GOTOPAGE(&quot;&quot;&quot; + PageObj.Name + &quot;&quot;&quot;)&quot;

End If
Next

&#039;// The following event selects the Table of Contents shape
&#039;// and centers it.

Application.ActiveWindow.SelectAll
Application.ActiveWindow.Page.CenterDrawing

&#039;// Clean Up
Set CellObj = Nothing
Set TOCEntry = Nothing
Set PageObj = Nothing

End Sub</description>
		<content:encoded><![CDATA[<p>A ComboBox is good but I prefer the following method. Plus you will find the above script fails since it has incorrect sub functions. IE. the private sub functions need to be &#8220;dim&#8221; rather than Private. Moving on. I think the below script will satisfy the needs of nearly anyone trying to automate the creation of a Table of Contents in Microsoft Visio. I found the base for this script after scouring the internet for a concise, succint, and straight forward self help article that is easy to understand and implement. I found a few ways to improve the script and I was unable to retrieve the name of the original author but at any rate; here ya go.</p>
<p>First, inside the Visio Document hit &#8220;Alt F11&#8243; or click Tools&gt; Macros&gt; Visual Basic Editor. Either way you get there, once inside the VB Editor Click Insert&gt; Module. Input the following text:</p>
<p>Option Explicit</p>
<p>Sub TableofContents()</p>
<p>&#8216;// Creates a shape for each page on the first page<br />
&#8216;// Adds a Double-Click GoTo link for each page.</p>
<p>Dim PageObj     As Visio.Page<br />
Dim TOCEntry    As Visio.Shape<br />
Dim CellObj     As Visio.Cell<br />
Dim Posy        As Double<br />
Dim PageCnt     As Double</p>
<p>&#8216;// The below event creates a shape only for the purpose<br />
&#8216;// of being deleted. Without this the script would fail.</p>
<p>Set TOCEntry = ActiveDocument.Pages(1).DrawRectangle(1, Posy, 4, Posy + 0.25)</p>
<p>ActiveWindow.SelectAll<br />
Application.ActiveWindow.Selection.Delete</p>
<p>&#8216;// ActiveDocument.Pages.Count gives the number of pages</p>
<p>PageCnt = 0</p>
<p>For Each PageObj In Activedocument.Pages<br />
     If PageObj.Background = False Then PageCnt = PageCnt + 1<br />
Next</p>
<p>&#8216;// Loops through pages.</p>
<p>For Each PageObj.Background = False Then &#8216; Only Foreground pages</p>
<p>&#8216;// Positions the page entries.</p>
<p>Posy = (PageCnt &#8211; PageObj.Index) / 4+ 1</p>
<p>&#8216;// Creates rectangle shape for each page entry.</p>
<p>Set TOCEntry = ActiveDocument.Pages(1).DrawRectangle(1, Posy, 4, Posy + 0.25)</p>
<p>&#8216;// Inputs page name inside rectangle.</p>
<p>TOCEntry.text = PageObj.Name</p>
<p>&#8216;// Add link pointing to the Page when double-clicking rectangle.</p>
<p>Set CellObj = TOCEntry.CellsSRC(visSectionObject, visRowEvent, visEvtCellDblClick) &#8216; Start</p>
<p>CellObj.Formula = &#8220;GOTOPAGE(&#8220;&#8221;" + PageObj.Name + &#8220;&#8221;")&#8221;</p>
<p>End If<br />
Next</p>
<p>&#8216;// The following event selects the Table of Contents shape<br />
&#8216;// and centers it.</p>
<p>Application.ActiveWindow.SelectAll<br />
Application.ActiveWindow.Page.CenterDrawing</p>
<p>&#8216;// Clean Up<br />
Set CellObj = Nothing<br />
Set TOCEntry = Nothing<br />
Set PageObj = Nothing</p>
<p>End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-29006</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 14 Dec 2011 22:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-29006</guid>
		<description>i am convinced now that everyone that writes VB tutorials is a tool and should head back to the tool box; beef up on their communication skills. Do a little QA on their tutorials. I dont know how many forums i see a guy respond to someone asking a question about VB and the dude asking NEVER gets back to him. because he/she didnt understand shit. lol.</description>
		<content:encoded><![CDATA[<p>i am convinced now that everyone that writes VB tutorials is a tool and should head back to the tool box; beef up on their communication skills. Do a little QA on their tutorials. I dont know how many forums i see a guy respond to someone asking a question about VB and the dude asking NEVER gets back to him. because he/she didnt understand shit. lol.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-29005</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 14 Dec 2011 21:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-29005</guid>
		<description>OK so everyone else is gonna swing on the nuts but not me. I havent got the patience for half assed tutorials. OK, so maybe they all knew enough about Visio to figure out where the author messed up. In defense of the author, it is better than most VB tutorials; which really arent tutorials at all but are instead a confusing bunch of garble. I am sure most will agree because not a single one is intuitive and step by step. Thus, stupidly leaving enormous room for error. Duh.
VB guys who write this need to learn to consider their audience and assume they are writing to somewhat unskilled scripters. Why they dont already assume that, being that they are writing self help articles, is beyong me. One day, they will grow some sense. But until then, condescending guys like me have to belittle. 
First, all of you need to stop assuming everyone reading has the same knowledge as the author. If they did, they wouldnt be looking through the internet for help. Duh. 
You have a guy on your post that points out a runtime 424 error. But the author and the guy with the problem are both to stupid to have a little clarity. The author is to lazy to correct it. So, instead, the author left a FRIGGIN FAIL TUTORIAL BECAUSE HE DIDNT EDIT IT SO ITS TOTALLY WORTHLESS TO ANYONE WHO IS AS CLUELESS AS MOST SYS ADMINS ON THE SUBJECT.</description>
		<content:encoded><![CDATA[<p>OK so everyone else is gonna swing on the nuts but not me. I havent got the patience for half assed tutorials. OK, so maybe they all knew enough about Visio to figure out where the author messed up. In defense of the author, it is better than most VB tutorials; which really arent tutorials at all but are instead a confusing bunch of garble. I am sure most will agree because not a single one is intuitive and step by step. Thus, stupidly leaving enormous room for error. Duh.<br />
VB guys who write this need to learn to consider their audience and assume they are writing to somewhat unskilled scripters. Why they dont already assume that, being that they are writing self help articles, is beyong me. One day, they will grow some sense. But until then, condescending guys like me have to belittle.<br />
First, all of you need to stop assuming everyone reading has the same knowledge as the author. If they did, they wouldnt be looking through the internet for help. Duh.<br />
You have a guy on your post that points out a runtime 424 error. But the author and the guy with the problem are both to stupid to have a little clarity. The author is to lazy to correct it. So, instead, the author left a FRIGGIN FAIL TUTORIAL BECAUSE HE DIDNT EDIT IT SO ITS TOTALLY WORTHLESS TO ANYONE WHO IS AS CLUELESS AS MOST SYS ADMINS ON THE SUBJECT.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris G</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-27649</link>
		<dc:creator>Chris G</dc:creator>
		<pubDate>Fri, 12 Aug 2011 10:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-27649</guid>
		<description>I am trying to create a chart detailing the organisation and team members, if i create text boxes with simple lists of names in, it will become unwieldy and hinder rather than help.

I know how to place a drop down box, but i cant fill it. All i want to do is under each team name, to have a box with a drop down arrow next to it that lists the team names. No links or codes are necessary, but thats all i can find online!</description>
		<content:encoded><![CDATA[<p>I am trying to create a chart detailing the organisation and team members, if i create text boxes with simple lists of names in, it will become unwieldy and hinder rather than help.</p>
<p>I know how to place a drop down box, but i cant fill it. All i want to do is under each team name, to have a box with a drop down arrow next to it that lists the team names. No links or codes are necessary, but thats all i can find online!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nick</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-27551</link>
		<dc:creator>nick</dc:creator>
		<pubDate>Wed, 15 Jun 2011 15:19:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-27551</guid>
		<description>hi everyone 
 this post was really BIG help for me while working in Visio files but i have question regarding same problem and it will be huge help for me and i think for many Visio users ...

 now question: 
 
 is it possible to make same flowchart like this above but instead of pages in chart use shapes ? i mean shape names or something like that coz i am using visio for drawing and there i have huge number of shapes and i need quick way to zoom on one of them and flowchart will be best coz ctr+f feels like stoneage ..........   

 hope for response and some help 
  mabe some one can change code for shapes or mabe show me how to
  make one.</description>
		<content:encoded><![CDATA[<p>hi everyone<br />
 this post was really BIG help for me while working in Visio files but i have question regarding same problem and it will be huge help for me and i think for many Visio users &#8230;</p>
<p> now question: </p>
<p> is it possible to make same flowchart like this above but instead of pages in chart use shapes ? i mean shape names or something like that coz i am using visio for drawing and there i have huge number of shapes and i need quick way to zoom on one of them and flowchart will be best coz ctr+f feels like stoneage &#8230;&#8230;&#8230;.   </p>
<p> hope for response and some help<br />
  mabe some one can change code for shapes or mabe show me how to<br />
  make one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-25092</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Tue, 16 Nov 2010 11:02:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-25092</guid>
		<description>Yet another OUTSTANDING bit of code and work!  Many thanks for the dedication to helping others!

Tim</description>
		<content:encoded><![CDATA[<p>Yet another OUTSTANDING bit of code and work!  Many thanks for the dedication to helping others!</p>
<p>Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PaulGam</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-22181</link>
		<dc:creator>PaulGam</dc:creator>
		<pubDate>Wed, 22 Apr 2009 19:20:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-22181</guid>
		<description>Thanks! Great post!!</description>
		<content:encoded><![CDATA[<p>Thanks! Great post!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Visio Guy</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-22041</link>
		<dc:creator>Visio Guy</dc:creator>
		<pubDate>Tue, 31 Mar 2009 15:02:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-22041</guid>
		<description>Hi Rod,

If you say, have a three page document, then try this:

&lt;code&gt;visio.ActiveDocument.Pages.Item(3).Index = 2&lt;/code&gt;

then the third page will move to the second location. The old page 2 will now be the third page in the document.

As far as the combobox goes, I&#039;m not sure exactly what you want to do. 

There *might* be a &quot;sorted&quot; property for the combo box that allows alphabetical sorting, and the .Add method might support a position index. These might be of use to you. But I haven&#039;t looked at this in awhile.</description>
		<content:encoded><![CDATA[<p>Hi Rod,</p>
<p>If you say, have a three page document, then try this:</p>
<p><code>visio.ActiveDocument.Pages.Item(3).Index = 2</code></p>
<p>then the third page will move to the second location. The old page 2 will now be the third page in the document.</p>
<p>As far as the combobox goes, I&#8217;m not sure exactly what you want to do. </p>
<p>There *might* be a &#8220;sorted&#8221; property for the combo box that allows alphabetical sorting, and the .Add method might support a position index. These might be of use to you. But I haven&#8217;t looked at this in awhile.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rodsoares101</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-22040</link>
		<dc:creator>rodsoares101</dc:creator>
		<pubDate>Tue, 31 Mar 2009 13:17:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-22040</guid>
		<description>Chris in the forum there was a posting regarding reorganizing the pages order, is it possible to use 

ActiveDocument.Pages.Item(2).Index = (3)

with the combolist to do that?
Thanks
Rod.</description>
		<content:encoded><![CDATA[<p>Chris in the forum there was a posting regarding reorganizing the pages order, is it possible to use </p>
<p>ActiveDocument.Pages.Item(2).Index = (3)</p>
<p>with the combolist to do that?<br />
Thanks<br />
Rod.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timoog</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-16466</link>
		<dc:creator>Timoog</dc:creator>
		<pubDate>Fri, 15 Feb 2008 08:40:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-16466</guid>
		<description>Ok sorry, total newbie question after all. The Combo box needs to have the name &#039;cmbPages&#039;. Thanks Again</description>
		<content:encoded><![CDATA[<p>Ok sorry, total newbie question after all. The Combo box needs to have the name &#8216;cmbPages&#8217;. Thanks Again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timoog</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-16443</link>
		<dc:creator>Timoog</dc:creator>
		<pubDate>Thu, 14 Feb 2008 17:33:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-16443</guid>
		<description>Looks really usefull for those large files. But I get this error when I go into run mode or try to click the combo box. Sorry if its a total newbie question!

- Runtime error &#039;424&#039;:

Object required

And when I debug it goes to the line

cmbPages.Clear

in the Private Sub m_updatePageList() function


any help appreciated</description>
		<content:encoded><![CDATA[<p>Looks really usefull for those large files. But I get this error when I go into run mode or try to click the combo box. Sorry if its a total newbie question!</p>
<p>- Runtime error &#8217;424&#8242;:</p>
<p>Object required</p>
<p>And when I debug it goes to the line</p>
<p>cmbPages.Clear</p>
<p>in the Private Sub m_updatePageList() function</p>
<p>any help appreciated</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jph</title>
		<link>http://www.visguy.com/2006/11/08/combo-box-table-of-contents/comment-page-1/#comment-11398</link>
		<dc:creator>jph</dc:creator>
		<pubDate>Thu, 06 Sep 2007 12:20:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.visguy.com/2006/11/08/combo-box-table-of-contents/#comment-11398</guid>
		<description>Very helpful</description>
		<content:encoded><![CDATA[<p>Very helpful</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 7/24 queries in 0.010 seconds using disk: basic
Object Caching 541/545 objects using disk: basic
Content Delivery Network via N/A

Served from: www.visguy.com @ 2012-02-11 01:26:01 -->
