![]() |
#1
|
|||
|
|||
![]()
Hello Friends,
I have a macro that is copying the results of one form field to about 15 others and I have entered the macro "On exit" so once the user updates the Drop-Down with his comments "Add" "Delete" I need the macro to say move to the next form field or toggle down. Any ideas? I usually use something like foundcell.Offset(1, 1) in excel but I am not sure how to get it to work in Word? Here is my code Sub LMSI_Office() Dim StrResult As String, i As Integer With ActiveDocument StrResult = .FormFields("LMSI_Office1").Result For i = 2 To 15 .FormFields("LMSI_Office" & i).Result = StrResult Next End With End Sub |
#2
|
||||
|
||||
![]()
Hi Johnny,
As mentioned in your other thread, simply tabbing out of the formfield will take you to the next one. If you click somewhere out of the formfield, Word doesn't know where you want to go next (eg you might want to go back to a previous formfield). So, if one were to build into an 'on exit' macro some code that forced the user to go to the next formfield, the result might be more aggravation than you really want.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Paul,
I don't think the user will mind. I sent a reply on the other thread. |
#4
|
||||
|
||||
![]()
In that case, you could use code like:
Code:
Sub LMSI_Office() Dim StrResult As String, i As Integer With ActiveDocument StrResult = .FormFields("LMSI_Office1").Result For i = 2 To 15 .FormFields("LMSI_Office" & i).Result = StrResult Next .Bookmarks("BookmarkName").Range.Fields(1).Result.Select End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
form field, macro, word 2003 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jabberwocky12 | Word VBA | 2 | 10-22-2010 12:23 PM |
![]() |
FraserKitchell | Excel | 4 | 02-26-2010 10:38 AM |
copy cell from sheet 2 to sheet 3 macro | slipperyjim | Excel Programming | 1 | 02-18-2010 01:31 AM |
![]() |
Styler001 | Word | 4 | 01-25-2010 06:40 PM |
Auto-populate an MS Word table cell with text from a diff cell? | dreamrthts | Word Tables | 0 | 03-20-2009 01:49 PM |