Freeze cursor position while running a macro

  • Thread starter Thread starter Kamran
  • Start date Start date
K

Kamran

Is it possible to freeze the cursor position while running a macro? I want
the user to be able to click an Option Button that goes and changes a bunch
of fields, but I want the cursor to stay where it is so that after it's done,
the user can just continue where they left off. The way it is now, the focus
ends up on the last field being modified, which is far away from the Option
Button being clicked.
Thanks.
 
Hello Kamran
Is it possible to freeze the cursor position while running a macro? I want
the user to be able to click an Option Button that goes and changes a bunch
of fields, but I want the cursor to stay where it is so that after it's done,
the user can just continue where they left off. The way it is now, the focus
ends up on the last field being modified, which is far away from the Option

non-developer here, so take the following with a grain of salt!

I see basically two possiblities:

1. you save the cursor position and place it there again after you're
code is through with the serious stuff, or

2. you use the range instead of the selection object in your code (or an
altogether different approach to do your changes).

If this all sounds Greek to you, see the "Beginners' tips" in
http://word.mvps.org/FAQs/MacrosVBA/index.htm

Specific VBA questions are best posed in one of the .vba newsgroups.

HTH
Robert
 
Back
Top