+ Reply to Thread
Results 1 to 3 of 3

Do while Loop - Form to Excel table

  1. #1
    Registered User
    Join Date
    01-03-2011
    Location
    Bangalore, India
    MS-Off Ver
    MS Excel 2010
    Posts
    49

    Question Do while Loop - Form to Excel table

    Hello there,

    I am trying to create a do while loop for the below code on the user form. Not able to execute. In below code Textbox1 has date (i.e FROM Date) this works fine.
    Now I have added another text box TextBox3 which will have (TO date). I want the do all the steps in the below code for each date i.e FROM date to TO date... eg if FROM date (TextBox1) is 07/01/2015 and To date (TextBox3) is 07/10/2015, i want the data to be copied from form to Excel table in 10 rows (each row for a single date).
    Any thoughts on how loop can be applied for this.

    Please Login or Register  to view this content.
    Thanks!
    H N S

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: Do while Loop - Form to Excel table

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-03-2011
    Location
    Bangalore, India
    MS-Off Ver
    MS Excel 2010
    Posts
    49

    Re: Do while Loop - Form to Excel table

    Thank you ranman for th equick assistance.
    But when i execute the code provided by you getting an error message "Complie Error: NEXT wihtout FOR".

+ 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] Need help setting up an Excel Loop thru a query table
    By cmwilbur in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2014, 03:50 PM
  2. Inserting a table in an excel form
    By andrete in forum Excel General
    Replies: 1
    Last Post: 02-08-2014, 11:30 AM
  3. How to use excel to consolidate data from one excel sheet into one table form
    By pearlynie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2013, 05:49 AM
  4. Excel VBA Loop with a Form
    By chad15 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-19-2011, 08:17 AM
  5. Excel Loop Macro - find text and copy to form new list
    By twinkle001 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2010, 02:41 PM

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