+ Reply to Thread
Results 1 to 2 of 2

Iterating a procedure by clicking on a button in user form

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question Iterating a procedure by clicking on a button in user form

    Hi there.
    I have a user form with some text boxes for user input, also there is a Add button. I want each time user change texts in text boxes and click on add button it adds the values to new row in my active excel sheet without loading the sheet again and again. My problem is I can do it just one time, by each change in textboxes and click it over write the new values in the same row.
    this is a simple sample of user form:
    New Picture (3).jpg

    I am writing the code on Button_click event of user form.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Iterating a procedure by clicking on a button in user form

    Change your rowindex to a dynamic rowindex (For example erow (empty row)) and when you click on Add button, the data will be entered in the next empty row. To find the last empty row you can use the following code. (change the rowindex and column index as per your choice)

    Please Login or Register  to view this content.
    Hope it helps.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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. [SOLVED] User Form - Hyperlink Button within a Form, to create a Link on a Designated Cell
    By Sinalk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2013, 07:29 AM
  2. Form commandbutton to replicate user clicking
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2012, 09:16 PM
  3. Cancel button on form deletes text and needs clicking twice
    By johncassell in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2010, 11:51 AM
  4. how to prevent user from clicking a button on error
    By ballack in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2007, 12:17 AM
  5. Choosing different cell values by user clicking a button
    By alymcmorland in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-04-2005, 11:41 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