how do you display a prompt with a list of options?

M

Michael F

Hi,

I wrote a macro that uses inputbox$ to display several bookmarks in the
prompt and go to the bookmark that I enter in the input field.

How do you display those choices in a pulldown menu? I can't figure out what
type of statement allows you to create a pulldown menu.


Michael F.
====================
Sub GotoBookmark()
'
' GotoBookmark Macro
' 7/19/2006 - GotoBookmark by Michael Frascinella
' 7/27/06 - added more chapters
' Prompt to select a chapter bookmark.
Dim Title, Prompt, default_value, Response As String
Title = "Chapter Bookmarks" ' Define title.
' Define the message.
Prompt = "Select a bookmark to go to:" & vbCrLf & _
"chapter1" & vbCrLf & _
"chapter2" & vbCrLf & _
"chapter3" & vbCrLf & _
"chapter4" & vbCrLf & _
"chapter5" & vbCrLf & _
"chapter6" & vbCrLf & _
"chapter7" & vbCrLf & _
"chapter8" & vbCrLf & _
"chapter9" & vbCrLf & _
"chapter10"
default_value = "chapter"

Response = InputBox$(Prompt, Title, default_value)

Selection.GoTo What:=wdGoToBookmark, Name:=Response

Selection.Find.ClearFormatting
End Sub
 
M

Michael F

Jezebel,

I am not well versed in VBA, so even with the MS Word online help, I can't
figure out how to create a listbox or a userform.

Where can I go to get some good documentation (something task oriented) on
this topic?
 
C

Charles Kenyon

C

Charles Kenyon

You are welcome. That site is a combined work of some excellent minds.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide




--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Top