Single pull down list for multiple pull downs

MS WORD

    Next

  • 1. Database Driven User Forms
    I have a user form that will have OptionButtons added dynamically from a database. That part is fine as I have this part working. Now i need to know how to create an event handler that will change the content of a text box (txtInfo) when the option buttons are clicked. The value that will fill the textbox will be pupulated from the database as well. '************************************************************ ' ADD THE OPTION BUTTONS TopPos = 4 MaxWidth = 0 'Stores width of widest OptionButton Do While Not objRS.EOF Dim TempID As String TempID = "Temp" & objRS("id_no") If objRS("template_version") = 0 Then strCaption = objRS("template_name") Else strCaption = objRS("template_name") & " - REV " & objRS("template_version") End If Set optTemplates = Controls.Add("forms.OptionButton.1") With optTemplates .Width = 200 .Caption = strCaption .Enabled = objRS("template_enabled") .Height = 15 .Left = 8 .Top = TopPos .AutoSize = True .Accelerator = objRS("template_accelerator") .Value = objRS("template_default") End With TopPos = TopPos + 15 objRS.MoveNext Loop
  • 2. inserting pictures into the document
    in my userform i have inserted pictures now i want to insert theses oictures into the document at a bookmark my question do i insert the image from the userform or do i insert the image from the original file location question 2 will i need to insert a picture box at the bookmark to insert the image into and how do i control the image size etc using vba thanks phil
  • 3. Name of the Shape
    This code refers to a Shape in the header of the word doc. Depending on what optionbutton is selected in the form the first one or the second one is bring to the front. The two shapes lies above each other. But how do I give a name to a shape (the name of the shape that I refer from the code?) If optTgs.Value = True Then ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes("Header TGS").ZOrder msoBringToFront ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes("Footer TGS").ZOrder msoBringToFront ElseIf optSvHamn.Value = True Then ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes("Header SvHamn").ZOrder msoBringToFront ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes("Footer SvHamn").ZOrder msoBringToFront End If Thanks! /Senad
  • 4. TextBox focus
    I have a user form with a series of selections. As the number of choices are many I have a "holding" frame into which other frames are moved to display the next selection. This is done simply by moving the frames and visible functions. I have one frame that contains 5 others. One of these 5 contains text boxes and associated labels only. When this frame is moved and becomes visible I want to set the focus to the first text box in the tab order, however, any attempt at setting the text box renders the frame invisible..although I have run a test and it is not actually "visible = false", just not viewable. Removal of the setfocus shows the frame where it is supposed to be. I have tried going back a step and setting focus on the frame instead, but to the same effect. I also tried looking at the send backwards and forwards, but to no avail. Any suggestions as to why this happens and how to get round it?

Single pull down list for multiple pull downs

Postby ScottP » Wed, 16 Mar 2005 00:46:06 GMT

I'm sure this question has come up but I've had no luck 
finding it.

The question, how would I have a single list that could 
be used to look up for multiple pull downs in my userform?

thanks,

ScottP

Re: Single pull down list for multiple pull downs

Postby Jonathan West » Wed, 16 Mar 2005 00:58:10 GMT






Do you mean by this that you want the content of other pulldowns to be set 
according to the selected value of one?


-- 
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org 


Re: Single pull down list for multiple pull downs

Postby ScottP » Wed, 16 Mar 2005 01:55:07 GMT

Sorry for the confusion:

List of Items:
Shoes
Shirt
Jeans
Socks

I would like to only type this list once and be able to 
use it over and over in the form (where need be) without  
having to retype the list contents in the drop down field 
properties.

Thanks,

ScottP
message 


userform?
pulldowns to be set 
www.classicvb.org 

Re: Single pull down list for multiple pull downs

Postby Jonathan West » Wed, 16 Mar 2005 02:11:29 GMT






Do you mean a form (i.e. a document with checkboxes, pulldowns etc), or a 
UserForm (custom dialog)?

I suspect you mean a form, in which case you should take a look at this 
article


Please Fill Out This Form
Create professional-looking forms in Word.
 http://www.**--****.com/ 


-- 
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org 


Re: Single pull down list for multiple pull downs

Postby Jean-Guy Marcil » Fri, 18 Mar 2005 13:49:23 GMT

ScottP was telling us:
ScottP nous racontait que :


Build your userform, then for each drop down where you want the same list, 
use the control's tag property. In this example I used  a tag named "MyDrop" 
(In the property windows in the VBE, each control you select has a Tag 
property. In fact, you can select all the dropdown you want to at the same 
time and enter the tag value only once for all of them.
Finally, in the initialize event of the userform, try some code like this:

'_______________________________________
Dim MyCtrl As Control
Dim MyArray As Variant

MyArray = Array("Select an item", "Item 1", "Item 2", "Item 3", "Item 4", 
"Item 5", "Item 6")

For Each MyCtrl In Me.Controls
    If MyCtrl.Tag = "MyDrop" Then
        MyCtrl.List() = MyArray
        MyCtrl.ListIndex = 0
    End If
Next
'_______________________________________

-- 
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
 XXXX@XXXXX.COM 
Word MVP site:  http://www.**--****.com/ 




Similar Threads:

1.Pull-Down menu scrolls down real slow

And I can't figure out why? When I click on 'file' it will 
take about 10 seconds before the complete underlying menu 
scrolls down. Is this a set-up issue?
Any advice is welcome. Greetings from the Alps
-frederick

2.Populating a pull down list in a .hta from AD

I'm working on a user.hta file and I need to populate a pull down of all 
the users, then with that I can populate all the other information 
fields and eventually get the hta to use POST to update specific 
information.

Anyone have an example of using some ADSI within an hta ?


Mike

3.Question to "Populating a pull down list in a .hta from AD"

4.create pull down menu to select multiple options

I need to create a pull down menu with the capability of allowing the user to 
selecting one or more of the listed options. Can this be done in Word 2007?

5.Multiple "Mail Merge's" in Pull-Down Menu

It seems that every time I go to the TOOLS pull-down menu 
it's added another "Mail Merge" line.

This quirk doesn't hamper the operation, it's just 
annoying.    

How do I delete the extra listings?

Thx much,

wtd

6. pull down list in word 2003

7. Creating Pull down menu list

8. word 2003 how to pull data from excel table using drop down list



Return to MS WORD

 

Who is online

Users browsing this forum: No registered users and 20 guest