+ Reply to Thread
Results 1 to 8 of 8

Vba Userform taking too long to insert value to worksheet from text box

  1. #1
    Registered User
    Join Date
    05-22-2011
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    71

    Vba Userform taking too long to insert value to worksheet from text box

    Hi

    I have created a Add button in userform and I coded but when it runs it taking too long time to insert the values to worksheet from userform textbox i'm not sure why...



    Can you guys please help.

    Thanks
    Thiru
    Last edited by sthiru; 05-21-2015 at 05:04 AM.

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Vba Userform taking too long to insert value to worksheet from text box

    It's a very large form with many tabs and many boxes. We need to know which tab you are using and what data to put in what boxes when the problem occurs. What button to push etc.

    We need to recreate exactly what you are doing when this happens.

    Thanks.

  3. #3
    Registered User
    Join Date
    05-22-2011
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    71

    Re: Vba Userform taking too long to insert value to worksheet from text box

    Quote Originally Posted by skywriter View Post
    It's a very large form with many tabs and many boxes. We need to know which tab you are using and what data to put in what boxes when the problem occurs. What button to push etc.

    We need to recreate exactly what you are doing when this happens.

    Thanks.
    Thank you for your message!
    Last edited by sthiru; 05-21-2015 at 05:05 AM.

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Vba Userform taking too long to insert value to worksheet from text box

    Okay that answers the tab part, what about the other questions? What do we enter into or do with each box and which button do we push?

  5. #5
    Registered User
    Join Date
    05-22-2011
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    71

    Re: Vba Userform taking too long to insert value to worksheet from text box

    Quote Originally Posted by skywriter View Post
    Okay that answers the tab part, what about the other questions? What do we enter into or do with each box and which button do we push?
    Just a normal values, you can enter any values 1,2,a,b,c anything but whatever we enter it takes almost 30 to 40 seconds for 6 text boxes.

    Thanks
    Thiru

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Vba Userform taking too long to insert value to worksheet from text box

    Thiru, you need to read all the questions and answer all the questions.

    What fields are required to be filled in, and what button do we push? In your first post you said "Add" button but there is no "Add" button.

  7. #7
    Registered User
    Join Date
    05-22-2011
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    71

    Re: Vba Userform taking too long to insert value to worksheet from text box

    Deleted DeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeletedDeleted
    Last edited by sthiru; 05-21-2015 at 05:06 AM.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Vba Userform taking too long to insert value to worksheet from text box

    That's better

    It seems to me that it should not be that slow, but I have implemented a change that speeds it up.

    Your are doing over 100 write operations to individual cells. This can be done in a single operation with an array. I have declared an array called Arr and stored all the data in the array. This is much faster than writing data to cells. Then I dump the array to the worksheet all at one time, also much faster than individual writes.

    You will need to check your output to make sure it is still correct.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. taking end text from a long string of text and "."
    By teknoboi in forum Excel General
    Replies: 3
    Last Post: 06-14-2013, 05:42 AM
  2. [SOLVED] Taking information from worksheet and transferring it to Userform textboxes
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2013, 12:08 PM
  3. Taking values/text from a userform
    By dylcon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2013, 12:00 PM
  4. Split a long text in a userform textbox to multiple rows on a worksheet
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-31-2012, 09:03 AM
  5. Optimizing Formulas - taking too long to calculate large worksheet
    By lightsandsirens in forum Excel General
    Replies: 0
    Last Post: 08-21-2012, 10:38 AM

Tags for this Thread

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