+ Reply to Thread
Results 1 to 5 of 5

Input Form to Get Data and Store it in Another Tab in Excel

  1. #1
    Registered User
    Join Date
    12-06-2016
    Location
    Poole
    MS-Off Ver
    MS 365 Subscription, Vers. 2310
    Posts
    84

    Input Form to Get Data and Store it in Another Tab in Excel

    Hello everyone

    I have followed a tutorial on how to make an input form to get data and store it in another sheet.

    I have used the code below. My only problem is that when I run the macro it moves the data on to the sheet that I require but it is to the last row in the table. How can i make it go on 1st available row instead?

    Please Login or Register  to view this content.


    Kind regards,

    Gabriel
    Last edited by GPetcu; 03-10-2020 at 11:06 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: Input Form to Get Data and Store it in Another Tab in Excel

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

  3. #3
    Registered User
    Join Date
    12-06-2016
    Location
    Poole
    MS-Off Ver
    MS 365 Subscription, Vers. 2310
    Posts
    84

    Re: Input Form to Get Data and Store it in Another Tab in Excel

    My apologies.

    I have now amended my post with the correct way of posting the code.

    Please accept my apologies.

    Gabriel

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Input Form to Get Data and Store it in Another Tab in Excel

    Hi GPetcu,

    You need to get a different value for next_row .

    Unfortunately, without seeing your table, we cannot give you an answer.

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Lewis

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this !


    Quote Originally Posted by GPetcu View Post
    How can i make it go on 1st available row instead?
    As a VBA beginner starter :

    PHP Code: 
    Sub data_input()
        
    With Sheets("Current")
            
    IIf(IsEmpty(.[A2]), .[A2], .[A1].End(xlDown)(2)).Resize(, 7).Value _
                
    Array([Person], [company_name], [PO_number], [GL_Code], [Commence_date], [Details], [Cost])
        
    End With
            
    [Person,company_name,PO_number,GL_Code,Commence_date,Details,Cost].ClearContents
    End Sub 
    ► Do you like it ? ► ► So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 03-27-2020 at 06:36 PM. Reason: optimization …

+ 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. Vba - read data from sheet1 in form & should store in sheet2
    By sabeelahmedks in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-14-2017, 06:02 PM
  2. Replies: 3
    Last Post: 02-27-2014, 12:06 PM
  3. Input data in one sheet and store data in another workbook (Macro)
    By Sabzero786 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2012, 06:10 AM
  4. Store and Retrieve User Inputs from Data Form
    By savio21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-30-2011, 04:00 PM
  5. Creating a data input form excel 2007
    By neonindian89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-14-2011, 03:58 AM
  6. Replies: 0
    Last Post: 04-18-2005, 02:06 PM
  7. Can I use an access form to input data to excel?
    By justchris in forum Excel General
    Replies: 2
    Last Post: 02-17-2005, 05:26 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