Reply
 
Thread Tools Display Modes
  #1   Report Post  
Jack_Feeman
 
Posts: n/a
Default Hyperlink macro assigned to checkbox form field

I have read a lot of great ideas on similar issues but not exactly this one.
In a protected Word Form, we want to add a "continue" check box in a table
cell to allow the form user to 'continue" the input of a cell by clicking a
checkbox that takes him/her to another page where they can continue that item
and click a macrobutton to return them to the cell they were previously in.

I recorded a macro to select the GotoBookmark{bookmark name}
In the Checkbox properties I assigned this maco to the "Run Macro on Entry"
field.

I assumed that when the checkbox was clicked, the form control would run the
macro assigned and the user would be taken to the bookmark.

Unfortunately, I was wrong. It sits there and does nothing with the form
locked. If I unlock the form (but still not in design mode) or with the form
unlocked and in design mode, it simply sits there.

What do I do to make the macro run?
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?SmFja19GZWVtYW4=?=,

Which version of Word is this? There are a couple of versions of Word, with no
SP / SR installed, where the "On Enter" functionality doesn't fire if you use a
mouse to navigate the form fields.

In any case, it's never going to work exactly as you imagine, because On Enter
and On Exit mean exactly that: they fire when the field gets or loses the focus.
There is no "Click" event for form fields. An ActiveX checkbox, from the
Controls Toolbox, could provide this, though.

I have read a lot of great ideas on similar issues but not exactly this one.
In a protected Word Form, we want to add a "continue" check box in a table
cell to allow the form user to 'continue" the input of a cell by clicking a
checkbox that takes him/her to another page where they can continue that item
and click a macrobutton to return them to the cell they were previously in.

I recorded a macro to select the GotoBookmark{bookmark name}
In the Checkbox properties I assigned this maco to the "Run Macro on Entry"
field.

I assumed that when the checkbox was clicked, the form control would run the
macro assigned and the user would be taken to the bookmark.

Unfortunately, I was wrong. It sits there and does nothing with the form
locked. If I unlock the form (but still not in design mode) or with the form
unlocked and in design mode, it simply sits there.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3   Report Post  
Jack_Feeman
 
Posts: n/a
Default

Thanks Cindy,

Its 2003. I used the control toolbox checkbox first, then read of all the
trouble of getting hyperlinks to run in a protected form, so when I saw the
run macro on Entry, I thought my problems were solved. On Entry sure looked
like it meant on entry (clicking the checkbox).

My Word VBA is very limited, so inserting the toolbox checkbox control into
the document, double clicking it to bring up the editor, and inserting ..(and
I jave no idea what to add)..... into the code will do it? Or do I also have
to use section breaks to separate it from the protected parts of the document?

Thanks for your quick response though.

Jack

"Cindy M -WordMVP-" wrote:

Hi ?B?SmFja19GZWVtYW4=?=,

Which version of Word is this? There are a couple of versions of Word, with no
SP / SR installed, where the "On Enter" functionality doesn't fire if you use a
mouse to navigate the form fields.

In any case, it's never going to work exactly as you imagine, because On Enter
and On Exit mean exactly that: they fire when the field gets or loses the focus.
There is no "Click" event for form fields. An ActiveX checkbox, from the
Controls Toolbox, could provide this, though.

I have read a lot of great ideas on similar issues but not exactly this one.
In a protected Word Form, we want to add a "continue" check box in a table
cell to allow the form user to 'continue" the input of a cell by clicking a
checkbox that takes him/her to another page where they can continue that item
and click a macrobutton to return them to the cell they were previously in.

I recorded a macro to select the GotoBookmark{bookmark name}
In the Checkbox properties I assigned this maco to the "Run Macro on Entry"
field.

I assumed that when the checkbox was clicked, the form control would run the
macro assigned and the user would be taken to the bookmark.

Unfortunately, I was wrong. It sits there and does nothing with the form
locked. If I unlock the form (but still not in design mode) or with the form
unlocked and in design mode, it simply sits there.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


  #4   Report Post  
Jack_Feeman
 
Posts: n/a
Default

I found the code to take me to the continue page (if form not protected) so I
will add the section break to separate it from the protected form which
should solve that issue.

Now for the return trip, anyone know how to code a command button to return
the user to the last point of reference on click. Something like the
javascript "Back" button which takes the user back one historical reference
on click? This would preclude me from entering 15 separate buttons; each
returning the user to a specific reference point.

thanks

Thanks

"Jack_Feeman" wrote:

Thanks Cindy,

Its 2003. I used the control toolbox checkbox first, then read of all the
trouble of getting hyperlinks to run in a protected form, so when I saw the
run macro on Entry, I thought my problems were solved. On Entry sure looked
like it meant on entry (clicking the checkbox).

My Word VBA is very limited, so inserting the toolbox checkbox control into
the document, double clicking it to bring up the editor, and inserting ..(and
I jave no idea what to add)..... into the code will do it? Or do I also have
to use section breaks to separate it from the protected parts of the document?

Thanks for your quick response though.

Jack

"Cindy M -WordMVP-" wrote:

Hi ?B?SmFja19GZWVtYW4=?=,

Which version of Word is this? There are a couple of versions of Word, with no
SP / SR installed, where the "On Enter" functionality doesn't fire if you use a
mouse to navigate the form fields.

In any case, it's never going to work exactly as you imagine, because On Enter
and On Exit mean exactly that: they fire when the field gets or loses the focus.
There is no "Click" event for form fields. An ActiveX checkbox, from the
Controls Toolbox, could provide this, though.

I have read a lot of great ideas on similar issues but not exactly this one.
In a protected Word Form, we want to add a "continue" check box in a table
cell to allow the form user to 'continue" the input of a cell by clicking a
checkbox that takes him/her to another page where they can continue that item
and click a macrobutton to return them to the cell they were previously in.

I recorded a macro to select the GotoBookmark{bookmark name}
In the Checkbox properties I assigned this maco to the "Run Macro on Entry"
field.

I assumed that when the checkbox was clicked, the form control would run the
macro assigned and the user would be taken to the bookmark.

Unfortunately, I was wrong. It sits there and does nothing with the form
locked. If I unlock the form (but still not in design mode) or with the form
unlocked and in design mode, it simply sits there.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


  #5   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?SmFja19GZWVtYW4=?=,

Its 2003. I used the control toolbox checkbox first, then read of all the
trouble of getting hyperlinks to run in a protected form, so when I saw the
run macro on Entry, I thought my problems were solved. On Entry sure looked
like it meant on entry (clicking the checkbox).

My Word VBA is very limited, so inserting the toolbox checkbox control into
the document, double clicking it to bring up the editor, and inserting

..(and
I jave no idea what to add)..... into the code will do it? Or do I also have
to use section breaks to separate it from the protected parts of the

document?

Controls from the Control toolbox work in protected sections, as long as
they're formatted to be in line with the text (no graphical textwrap
formatting). So no need to include a section break just for that :-)

Now for the return trip, anyone know how to code a command button to return
the user to the last point of reference on click.

I'd have the code that "jumps" note the calling location in a document
Variable (ActiveDocument.Variables("name") = "info"). Then the code to "jump
back" reads that variable and moves to that location.

Since you're mixing form field and ActiveX controls, you'll probably need to
store whether the point of origin is a form field or an ActiveX control. To
get an ActiveX control you need to query the InlineShapes collection. And, in
this case I'd place a bookmark AROUND that control so that you can do
something like this
ActiveDocument.Bookmarks("Checkbox").Range.InlineS hapes(1).Select

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2003 forms (checkbox form field) change default x to tick?? Tony Microsoft Word Help 1 July 13th 05 09:19 PM
Enter data in 1 text form field & have multiple locations fill Lee Microsoft Word Help 1 March 16th 05 11:56 PM
Search for Checkbox Form field in a macro coginthemachine Microsoft Word Help 1 February 23rd 05 09:49 AM
Adding Autotext in a Macro User Form field Onka Microsoft Word Help 1 February 10th 05 06:39 AM
Text Form Field Ref in Footer Won't Update on Screen StarWine Microsoft Word Help 3 December 6th 04 07:17 PM


All times are GMT +1. The time now is 08:58 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"