Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2007

Tip: Looking for answers? Try searching our database.

How to use VBA to trigger formfield formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MattM - 20 Feb 2007 16:46 GMT
Hi, I have some form fields with number (#,###) or currency (£#,###)
formatting. I also have a VBA macro which calculates values based on these
and puts the results in other form fields.

It works fine except for the formatting; the last field the user has edited
is left in raw number format (000). To trigger the formatting the user has to
click on the field and press Tab.

Is there any way I can trigger this from VBA [preferably without resorting
to something nasty like formfield.result = format (formfield.result ,
"£#,###") ] ?

Thanks!
MattM - 21 Feb 2007 14:24 GMT
I got it working using
ActiveDocument.FormFields(sBkmName).Result =
ActiveDocument.FormFields(sBkmName).Result
Matt
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.