+ Reply to Thread
Results 1 to 7 of 7

Save data from UserForm into Sheet (how to resolve runtime errors in UserForm tutorial)

  1. #1
    Registered User
    Join Date
    02-24-2014
    Location
    Birmingham, AL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Save data from UserForm into Sheet (how to resolve runtime errors in UserForm tutorial)

    I found what seems to be a helpful tutorial site for VBA in Excel.

    http://blog.oppoin.com/cookbooks/but...ting-old-data/

    Below is the code that the lesson instructs to write. I have a simple table in Sheet1 that I recreated below. The combobox doesn't populate and if I attempt to input values into the form, I receive the runtime error to the noted error below in one of the subs.

    Am I missing something to resolve this issue? Thank you for your help.

    Please Login or Register  to view this content.
    Dog Woof!
    Cat Meow!
    Birt Tweet!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Save data from UserForm into Sheet (how to resolve runtime errors in UserForm tutorial

    Hello eighty6,

    Welcome to the Forum!

    It would help if you posted your workbook for comparison.

    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-24-2014
    Location
    Birmingham, AL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Save data from UserForm into Sheet (how to resolve runtime errors in UserForm tutorial

    I've attached the workbook. Thank you. Lesson28.xlsm

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Save data from UserForm into Sheet (how to resolve runtime errors in UserForm tutorial

    Hello eighty6,

    Thanks for posting the workbook.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Save data from UserForm into Sheet (how to resolve runtime errors in UserForm tutorial

    Hello eighty6,

    You named the UserForm_Initialize() event as EditForm_Initialize(). While you can rename the Form or Controls, you can not rename the event procedure names.

    Delete that Sub in your UserForm code and add this instead...
    Please Login or Register  to view this content.
    Now it should work.

  6. #6
    Registered User
    Join Date
    02-24-2014
    Location
    Birmingham, AL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Save data from UserForm into Sheet (how to resolve runtime errors in UserForm tutorial

    That worked. Thank you! At one point, I had "UserForm_Initialize()". I was still getting another error. I must have fixed the error and also attempted to change the event procedure name. I should have changed one thing and then tested prior to changing another.

    Thanks, again.

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Save data from UserForm into Sheet (how to resolve runtime errors in UserForm tutorial

    Hello eighty6,

    You're welcome. Have fun. If you get stuck again, you know where to come for answers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Userform, Search, copy an paste data from a userform database to another sheet.
    By masro in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2015, 02:42 PM
  2. How Userform Commandbutton actually Save data into excel sheet?
    By z-eighty2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2014, 11:55 AM
  3. Userform to Search based on Unique ID update and save data in an exel sheet
    By Rosco90 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-17-2013, 04:50 PM
  4. [SOLVED] VBA Help need for pullout data to new sheet from Master Sheet & save as new file (UserForm
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 01-19-2013, 06:01 PM
  5. How to move data from userform to userform and save?
    By artromanov in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2007, 03:09 AM

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