+ Reply to Thread
Results 1 to 8 of 8

Coding Cmd Button in userform

  1. #1
    Registered User
    Join Date
    04-03-2009
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    15

    Coding Cmd Button in userform

    I am trying to figure out how to do the coding for a command button in a userform I've created. It has 5 textbox fields. I want the command button when clicked to transfer the data in those 5 fields to 5 specific cells in a hidden sheet. Then I also want that button to launch a word document.

    Anyone know how I can go about this or where I can go that explains the specific coding?

    I've tried searching with mixed confusing results & read through http://www.contextures.com/xlUserForm01.html#Top & http://www.theofficeexperts.com/down...ExcelDownloads examples.

    Thanks in advance

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Help Coding Cmd Button in userform

    Welcome to the Forum!

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-03-2009
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    15

    Re: Help Coding Cmd Button in userform

    I did a quick trial and while I didn't get any errors nothing seemed to happen.

    This is what I have.

    Please Login or Register  to view this content.
    What did I enter wrong?

    Thanks for the help BTW!

  4. #4
    Registered User
    Join Date
    04-03-2009
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    15

    Re: Help Coding Cmd Button in userform

    OK, I reentered it as

    Please Login or Register  to view this content.
    It works! Thanks a million!

    However, I notice the cmd window pops up, is there a way to kill it after it launches the document?

  5. #5
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Help Coding Cmd Button in userform

    You can hide it.
    Please Login or Register  to view this content.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help Coding Cmd Button in userform

    OP forgot to post his crosslink.

    http://www.mrexcel.com/forum/showthread.php?t=382174
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  7. #7
    Registered User
    Join Date
    04-03-2009
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    15

    Re: Help Coding Cmd Button in userform

    Quote Originally Posted by JBeaucaire View Post
    I posted on that forum first and after several hours and bumps I got no replies. Was it wrong of me to try here?

    I would have mentioned in the OP, but I tried to keep it clutter free since it would have no relevance with no one else contributing over there.
    Last edited by Karkas; 04-03-2009 at 08:23 PM.

  8. #8
    Registered User
    Join Date
    04-03-2009
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    15

    Re: Help Coding Cmd Button in userform

    Quote Originally Posted by Kenneth Hobson View Post
    You can hide it.
    Please Login or Register  to view this content.
    BTW, thank you so much! It is working perfectly now!

+ 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.6.0 RC 1