Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
|
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2009, 02:24 PM
Registered User
 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Word 2007 VBA validation of formfield

I have a Word 2007 form that I am trying to do two things with.

First, I have 11 exam site choices with text boxes. I want the user to give me the order of their top three choices of where they want to test. I want to validate it so that they can only give me choices 1-3 (in other words, not give me two #1 choices) and not allow them to choose more than 3.

Second, I need to validate the data in the formfields. If the formfield is invalid, I want to set the focus back on the formfield that is in error. Like the validation for the first item above, if they enter a '4' in the text box, I want to display a message box that tells them they can only choose up to 3 (I have this part working). I want the focus to be set back to this field so they have to try again.

Thanks for any help,
Beth Harless





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using VBA to Search in Access 2007 culleng Visual Basic 2008 Essentials 1 May 25th, 2009 09:30 PM
Word 2007, undo, VBA FredrikH Word VBA 0 April 16th, 2009 04:20 AM
excel 2007 vba UDF DavidReese BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 1 February 24th, 2009 01:10 AM
TreeView in VBA (Access 2007) linhqhta BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 1 August 6th, 2008 04:14 AM
Word Formfield Calcuations gamt67 Word VBA 0 July 24th, 2006 02:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.