PDA

View Full Version : Solved: Help in Forms



ctengelen
09-27-2005, 02:16 PM
Hi All Word VBA Gurus:

I am new in VBA and trying my best to learn as I go. Here is my problem:

I have a form that is built in tables and protected where the user just fills in the blanks.

One part of the form is an unknown, that is we do not know how many entries we have at one time (1 be one or 15 or any other number).

I created an AutoText for the rows with bookmarks, so VBA knows where to place the data and placed a bookmark to where the AutoText should be inserted..I manually inserted my AutoText and run my little UserForm and it works fine once and than my bookmark is gone.

How can I make sure the bookmark stays so when I tell VBA to insert my AutoText again for the next entry to go there.

I need to solve this problem first before I can go on in trying to write my code for this form.

:banghead: Trudy

TonyJollans
09-27-2005, 03:15 PM
Hi Trudy,

Welcome to VBAX!

Yes, this can be a problem with bookmarks. It is often easier to re-insert a bookmark than to try to avoid deleting it.

However inserting an autotext doesn't necessarily overwrite a bookmark and I'm not quite sure exactly what you're doing. Can you either give a bit more detail, or post some code or, better yet, upload a sample document?

ctengelen
09-28-2005, 07:16 AM
Hi Tony,

Thanks for your quick reply. The attached Form will explain a bit more as to what my problem is with this file. I send it to you Unprotected.

Please have a look at the Note on the spot that I need to insert the information.

Thanks so much for all your help.

Trudy

ctengelen
09-28-2005, 02:07 PM
Hello Gurus of the wonderful world of VBA!!

Wonder over wonders - I found out a fast way around "losing my bookmark" I just wrote into the macro - move one character over and then insert the AutoText. This way, once the AutoText gets inserted it moves my bookmark (has too) and the routine can run again. I have since also finished writing my macros and again: Wonder over wonder my macros actually run correct!
Yippee!!:beerchug: I am sooooooooooo relieved.:rotlaugh:

I think just to know that their is someone out there that can help has put my brainwaves into think mode.

Trudy

ctengelen
09-28-2005, 02:13 PM
I hope this is the way to mark my problem as solved?!?!?!? I forgot (in my happiness) to mark it.

Trudy

:whistle:

MOS MASTER
09-29-2005, 02:26 PM
Hi and Welcome to VBAX Trudy, :hi:

Glad to see you've solved your own problem and to see your a joly person. (Thanx for marking your thread solved)

Till the next time. :thumb