Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 28 of 28

Thread: INSERTING AUTOTEXT VIA RADIO BUTTONS

  1. #21
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    OK. Fair enough. Then fill up the textboxes from with the text that was put into the bookmarks.

    The useform puts text into bookmarks. It can just as easily prefill the textboxes with what is in the existing bookmarks.

    You have already done this I believe.

  2. #22
    VBAX Tutor
    Joined
    Nov 2005
    Posts
    225
    Location
    Hi again Gerry.

    This brings me back to my original problem. I thought I had done everything correctly to retain the text in the bookmarks (and show the retained text in the userform) but something is obviously amiss. I don't know what it is and I was hoping you might identify the problem.

    Can you see where I may have gone wrong?

    By the way, has it stopped snowing yet?

    Greg.

  3. #23
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    I thought I had done everything correctly to retain the text in the bookmarks (and show the retained text in the userform)
    What on earth did you think that was???

    Hmmm. maybe it was someone else, but I thought it was you.

    OK. You want previous values - that were placed into bookmarks - put BACK into the textboxes when the userform is loaded again. Right?

    So, how do you think you would do that?
    OK. Fair enough. Then fill up the textboxes from with the text that was put into the bookmarks.

    The useform puts text into bookmarks. It can just as easily prefill the textboxes with what is in the existing bookmarks.

  4. #24
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    What I am saying is, work out the logic...what you want it to do.

    You want the userform, when it loads to see if there is anything in the bookmarks. If there is, grab that and put it in the appropriate textbox on the userform.

    You have no logic for this in the userform_initialize event.

  5. #25
    VBAX Tutor
    Joined
    Nov 2005
    Posts
    225
    Location
    Okay, I have another look at it.

  6. #26
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Trying to find that thread.

    In the Initialize event:

    If bookmark.range.text <> "" then
    userform.textbox.text = bookmark.range.text
    End If

    will load the userform textboxes with the text from the bookmarks, if any.

  7. #27
    VBAX Tutor
    Joined
    Nov 2005
    Posts
    225
    Location
    Many thanks. I'll sort it out tonight.

    Greg.

  8. #28
    VBAX Tutor
    Joined
    Nov 2005
    Posts
    225
    Location
    Eureka. I got it.

    The next challenge will be to get the autoext to accept some variables like dates or account numbers and so on. But that'll have to wait.

    Many thanks for your help Gerry.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •