+ Reply to Thread
Results 1 to 8 of 8

Thread: UserForm Command button

  1. #1
    Registered User
    Join Date
    12-20-2010
    Location
    London
    MS-Off Ver
    Word 2003
    Posts
    6

    UserForm Command button

    Ok, I haven't received any advice to my previous post so I'm trying to do something on my own...

    So, I thought that I can create few Command Buttons on UserForm and every one of them will make different form on document appear. First I tried to create one checkbox by command button.

    Private Sub CommandButton1_Click()
    
    Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormCheckBox
    
    Selection.TypeParagraph
        
    End Sub


    And i got this error in the highlighted line above :

    Run-time error '4605': This command is not available
    Any advice ? :D I use Word 2003

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,648

    Re: UserForm Command button

    Try attaching an example document

    What sort of form do you mean/
    Last edited by royUK; 01-06-2011 at 05:41 AM.
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Registered User
    Join Date
    12-20-2010
    Location
    London
    MS-Off Ver
    Word 2003
    Posts
    6

    Re: UserForm Command button

    Ok it was because Form was protected and apparently it can't. But, if form is not protected u cannot check form checkboxes or use drop down lists

    And I want for user to press one of the buttons, certain form appears, user can tick checkboxes etc and print document.

    I attached doc with normal buttons from Control Toolbox but the same error occurs.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    537

    Re: UserForm Command button

    See if this is something like you are wanting to accomplish....see attached 2003 Word.docs
    Show Form.doc has check boxes
    Show Form1.doc has both checkboxes and command buttons
    Attached Files Attached Files
    Last edited by jwright650; 01-06-2011 at 04:24 PM. Reason: added second doc file
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  5. #5
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    537

    Re: UserForm Command button

    bumped back to the top
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  6. #6
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    537

    Re: UserForm Command button

    bump back to the top
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  7. #7
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,648

    Re: UserForm Command button

    John

    Why are you bumping this?
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  8. #8
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    537

    Re: UserForm Command button

    Doesn't look like the OP has been on for a few days and was just bumping it back to the top of the New Post list. Just wondering if the OP can use anything that we came up with or not.
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0