+ Reply to Thread
Results 1 to 6 of 6

faster method for saving data from userform to worksheet

  1. #1
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    faster method for saving data from userform to worksheet

    I have a userform and on the userform there is a save commandbutton. When I first began, the save method only took a couple of seconds. Now that I have over 600 records, it takes much longer. Just seeing if there is a more efficient quicker way to do this

    HTML Code: 
    thanks,

    Josh

  2. #2
    Registered User
    Join Date
    05-02-2004
    MS-Off Ver
    2007
    Posts
    43
    One thing that will speed your code up, is to stop using Select and Activate. Have a look at this silly example and see if it helps to get you going:

    Please Login or Register  to view this content.
    HTH

    TJ

  3. #3
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481
    What is it that you are searching for "n" ?

    You could save some time by not activating and selecting things.

    Give this a try:

    Please Login or Register  to view this content.
    As your sheet grows it will still be slower but this should help.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why are you looking for n? This will find the next empty row in Column F

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  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,259
    Hello Josh_123456,

    Based on your comment that after adding 600 records, I doubt this code fragment is slowing you down. The code only retrieves one find result per execution. So you probably are calling this from another loop. You should post your workbook so we can review all your code.

    Sincerely,
    Leith Ross

  6. #6
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    Re: faster method for saving data from userform to worksheet

    I finally got a chance to redo the coding for this.... and while testing, it worked great and was very fast... now it is very slow when it runs....

    there are only 20 records.... any ideas

    below is what I am currently using

    HTML Code: 

    thanks for any direction

    Josh

+ 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