Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael F - 31 Jul 2006 14:40 GMT
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
Jezebel - 31 Jul 2006 14:44 GMT
Use a listbox on a UserForm.

> Hi,
>
[quoted text clipped - 35 lines]
> Selection.Find.ClearFormatting
> End Sub
Michael F - 31 Jul 2006 15:44 GMT
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?

Signature

Michael F.

> Use a listbox on a UserForm.
Charles Kenyon - 31 Jul 2006 16:05 GMT
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
Signature

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
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.

> Jezebel,
>
[quoted text clipped - 5 lines]
>
>> Use a listbox on a UserForm.
Michael F - 31 Jul 2006 18:09 GMT
Charles,

Thanks. That web site had just what I needed and more!

Michael F.

> http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
> > Jezebel,
[quoted text clipped - 6 lines]
> >
> >> Use a listbox on a UserForm.
Charles Kenyon - 31 Jul 2006 18:49 GMT
You are welcome. That site is a combined work of some excellent minds.
Signature

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
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.

> Charles,
>
[quoted text clipped - 14 lines]
>> >
>> >> Use a listbox on a UserForm.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.