J
jkitzy
<sigh> This is frustrating me. I'm sure the answer is simple, but I can't
find it. Bear with me.
I have a form with non-ActiveX fields in Word 2003. FieldA is a drop-down
and based on the choice (with an OnExit macro), fields after FieldA become
either enabled or disabled.
Let's say I have text field FieldA_1A and dropdown FieldA_2A. Depending on
my choice in FieldA, one or the other of those two are enabled. Both are
disabled to start (you must choose something from FieldA to enable the
appropriate field.
My problem is that when I tab out, FieldB (which is after these) is where my
selection goes, even when I select the appropriate field at the end of the
exit macro.
Any suggestions? Code is below:
===============
Sub goRate()
'get section number
a = Selection.Information(wdActiveEndSectionNumber)
'Assign CR Section
a = a - 4
'Run Rate function for request
Rate (a)
'Select RateFix in curent CR
ActiveDocument.FormFields("CR" & a & "_RateFix").Select
End Sub
===============
The Rate function enables/disables various fields based on the choice made
in the source field. But when this is finished running, it jumps to the field
AFTER the recently enabled/disabled fields, skipping over the enabled fields
even though, darn it, I select it in the code...
Any thoughts? I know this must be simple. I'm not used to using VBA in Word
- it's unusually different than VBA in Excel.
find it. Bear with me.
I have a form with non-ActiveX fields in Word 2003. FieldA is a drop-down
and based on the choice (with an OnExit macro), fields after FieldA become
either enabled or disabled.
Let's say I have text field FieldA_1A and dropdown FieldA_2A. Depending on
my choice in FieldA, one or the other of those two are enabled. Both are
disabled to start (you must choose something from FieldA to enable the
appropriate field.
My problem is that when I tab out, FieldB (which is after these) is where my
selection goes, even when I select the appropriate field at the end of the
exit macro.
Any suggestions? Code is below:
===============
Sub goRate()
'get section number
a = Selection.Information(wdActiveEndSectionNumber)
'Assign CR Section
a = a - 4
'Run Rate function for request
Rate (a)
'Select RateFix in curent CR
ActiveDocument.FormFields("CR" & a & "_RateFix").Select
End Sub
===============
The Rate function enables/disables various fields based on the choice made
in the source field. But when this is finished running, it jumps to the field
AFTER the recently enabled/disabled fields, skipping over the enabled fields
even though, darn it, I select it in the code...
Any thoughts? I know this must be simple. I'm not used to using VBA in Word
- it's unusually different than VBA in Excel.