PDA

View Full Version : Page Name in a List Box



coachwalters
03-31-2003, 07:53 PM
I would like to create one page (sort of like a table of contents). When the page loads, it reads the names of all of the pages in the project and displays the name in a list box. From there, the user should be able to click on the name and jump to that page.
I want to do this, so I don't have to manually enter the name of the page each time I add a page to the project.
Thanks in advance for any help.

Worm
04-01-2003, 09:01 AM
It seems the best way to do this would be with a macro. I've tried to do it myself, but have been unsuccessful.

I've been able to get the names of all the pages, but I can't seem to manipulate the Listbox with the macro code.

Here's what I've tried, maybe someone can point me in the right direction

Dim nCounter As Integer
Dim nObjectIndex As Integer

nObjectIndex = Pages(0).FindObject("Listbox1")

For nCounter=0 To PageCount -1
ActionListBoxAdd "ListBox1","0","0", Pages(nCounter).Name, ";;"
Next nCounter

coachwalters
04-01-2003, 10:39 AM
Thanks for the quick response. How can you get the names of the pages? Is there a function for that? I have to missing something, somewhere.

Thanks again for your help. I truly appreciate it.