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 / May 2006

Tip: Looking for answers? Try searching our database.

Bookmark data in UserForm?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TomorrowsMan - 27 Apr 2006 17:10 GMT
Is there a simple way to add a bookmark reference to a userform popup?

The user selects five ratings of 1-4, which get totaled to the bookmark
CompTot1 when the user clicks a "Validate" command_button on the page.
I would like a UserForm to popup that says, "Your subtotal is
[CompTot1].  Is this a performance review?

At that point the user clicks on command_button YES or NO, which takes
them to one of two different bookmarks.

I have the second half completed; but I'm finding it tricky to get the
CompTot1 bookmark subtotal into the UserForm; there's lots of info on
how to get userform data 'down' to the form, but not 'up' from it, if
that makes sense....

Thanks!

Chris
Greg Maxey - 27 Apr 2006 17:34 GMT
Chris,

Say you want the value of CompTot1 in textbox1 of the form:

Private Sub UserForm_Initialize()
Me.TextBox1.Value = ActiveDocument.Bookmarks("CompTot1").Range.Text
End Sub
TomorrowsMan - 01 May 2006 23:28 GMT
Thank you!

It's almost perfect -- the only thing is, it returns the value
"FORMTEXT X.XX," where X.XX is the number I am trying to show in the
userform.  So instead of getting "Your rating is 3.50" I am getting
"Your rating is FORMTEXT 3.50".

Any way to truncate this to just the number?

Thanks again!

Chris
TomorrowsMan - 02 May 2006 16:39 GMT
Ah, ha!   think I figured it out!

I added your script to the UserForm_Activate() Sub, and that seems to
be doing the trick!

Thanks again!
 
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.