Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-05-2012, 01:03 AM
KateAus KateAus is offline Visual basic code for Word 2003 template Windows XP Visual basic code for Word 2003 template Office 2003
Novice
Visual basic code for Word 2003 template
 
Join Date: Sep 2012
Posts: 3
KateAus is on a distinguished road
Default Visual basic code for Word 2003 template

I am trying to help my daughter's preschool staff by creating a Word document template that will make an onerous administrative task quicker and easier.



I have discovered that to get the functionality we need, I have to create a userform with visual basic. Not being a developer, I have managed to get so far with it, but just can't work out how to get it to do the last step. Basically, I want it to:

1. as the user tabs into the form text field (bookmarked as Outcomes1), a list box (boxOutcomes1) pops up -- this much I can do

2. in the list box is a list of criteria that the staff member will select, using fmMultiSelectExtended -- this much I can do

3. after clicking the OK button on the pop up, the selected criteria will be inserted in the text field (Outcomes1) -- THIS I CAN NOT WORK OUT HOW TO DO!!

Below is the code I have found works up to the point where I'm stuck. Is there anyone out here in internet-land that can help me finish this little project?

Many, many thanks for any help. Even pointing me to another forum that can help would be appreciated.


Code:
Private Sub boxOutcomes1_Change()
ActiveDocument.FormFields("Outcomes1").Result = boxOutcomes1.Text
End Sub
 
Private Sub UserForm_Initialize()
boxOutcomes1.List = Array("a. Separates and settles well;", "g. Openly expresses feelings;", "h. Cooperates with others;", "i. Is learning to negotiate;", "j. Makes predicted transitions smoothly;", "k. Is open to new challenges and discoveries;", "l. Celebrates and shares their contributions and achievements;", "m. Identifies and writes own name;")
End Sub

Last edited by macropod; 09-07-2012 at 09:33 PM. Reason: Added code tags
Reply With Quote
  #2  
Old 09-05-2012, 04:58 AM
Charles Kenyon Charles Kenyon is offline Visual basic code for Word 2003 template Windows Vista Visual basic code for Word 2003 template Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I'm not sure you need a userform, but these are very useful when needed. See Create and employ a Userform

I would think a typical fill-in form (not a userform but a document template) with a checklist might do what you need, even if not being as elegant. You would use formfields under the forms toolbar and protect the template for forms. See Please Fill Out This Form.
Reply With Quote
  #3  
Old 09-07-2012, 08:50 PM
KateAus KateAus is offline Visual basic code for Word 2003 template Windows XP Visual basic code for Word 2003 template Office 2003
Novice
Visual basic code for Word 2003 template
 
Join Date: Sep 2012
Posts: 3
KateAus is on a distinguished road
Default

Thanks for that reply, however I have referred to the first page you suggested previously. It was some help.

I ended up going with a userform because of the number of characters I needed in the responses to choose from.

I'm having trouble connecting to the other link you provided.
Reply With Quote
  #4  
Old 09-08-2012, 05:57 AM
gmaxey gmaxey is offline Visual basic code for Word 2003 template Windows XP Visual basic code for Word 2003 template Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Please add a links to the cross posts that you have made in other forums.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #5  
Old 09-09-2012, 08:40 PM
KateAus KateAus is offline Visual basic code for Word 2003 template Windows XP Visual basic code for Word 2003 template Office 2003
Novice
Visual basic code for Word 2003 template
 
Join Date: Sep 2012
Posts: 3
KateAus is on a distinguished road
Default

My apologies, I didn't realise these forums "crossed over" so to speak.

http://answers.microsoft.com/en-us/o...af97fd7?page=1

I have been making progress with the excellent help I have received at the other thread.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Visual Basic error - run time error 504 crazymorton Word 11 01-13-2012 04:32 AM
Visual Basic Editor changes from 2003 to 2007 Rockitman31 Word VBA 4 09-21-2011 12:01 PM
Visual basic code for Word 2003 template Word Basic 2003 to Word Basic 2007 Incompatibility Mark1110 Word VBA 1 12-29-2010 11:04 PM
Referencing Tables in Visual Basic Editor DavidB Word Tables 0 09-21-2009 04:01 PM
Visual basic code for Word 2003 template A little Visual Basic Help Please leroytrolley Excel 4 08-22-2008 03:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft