+ Reply to Thread
Results 1 to 9 of 9

Data Input using VBA excel forms

  1. #1
    Registered User
    Join Date
    02-16-2014
    Location
    Northampton
    MS-Off Ver
    Excel 2013
    Posts
    14

    Data Input using VBA excel forms

    i have currently made a form using excel see below
    forms.jpg
    i would like to create a code that would use the textbox1 and textbox2 as search criteria
    and then for it to insert the data in textbox3,4 and 5 into required cells

    for example
    textbox 2 to search for the worksheet for requested Vehicle Reg then
    textbox 1 to search for the cell with the exact date already inserted then
    for the data in textbox3 to be written in B4
    for the data in textbox4 to be written in C4
    and for the data in textbox5 to be written in E4

    in any one sheet per vehicle i have 365 days
    and i have a total of about 51 vehicles

    any help would be greatly appriciated

    the code i have already for the ok button is as below,

    Please Login or Register  to view this content.
    again any help would be greatly appriciated
    Last edited by Darrel1986; 02-16-2014 at 11:41 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Data Input using VBA excel forms

    Hi, Darrel1986,

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    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



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)


    ====

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    02-16-2014
    Location
    Northampton
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Data Input using VBA excel forms

    Edited post

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Data Input using VBA excel forms

    Hi, Darrel1986,

    thanks for editing the code, what about a workbook? Will the vehicles be on a sheet each on itīs own, will they be on a daily/weekly/monthly/quarterly sheet? How is the date on this sheet created: values or formula dragged? Is this as Row or Column? The UF doesnīt pass that information.

    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    02-16-2014
    Location
    Northampton
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Data Input using VBA excel forms

    One vehicle per worksheet witch has the first column as the date written in text the start mileage finish mileage then total mileage for the day which is a formula then fuel
    Grime left to right there is 12 months in total
    Hope this helps

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Data Input using VBA excel forms

    Hi, Darrel1986,

    still donīt know exactly how your worksheets look like so this is my one and only guess at it:
    Please Login or Register  to view this content.
    Ciao,
    Holger

  7. #7
    Registered User
    Join Date
    02-16-2014
    Location
    Northampton
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Data Input using VBA excel forms

    i have included a worksheet as an example but have blanked out the vehicle reg for protection

    worksheet.jpg

  8. #8
    Registered User
    Join Date
    02-16-2014
    Location
    Northampton
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Data Input using VBA excel forms

    There are 51 of these worksheets in the workbook
    All go upto December
    The yellow column has a simple formula in it and do not need anything to be written in these columns
    Last edited by Darrel1986; 02-16-2014 at 12:47 PM.

  9. #9
    Registered User
    Join Date
    02-16-2014
    Location
    Northampton
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Data Input using VBA excel forms

    Help appreciated will try it

+ 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. Forms in Excel - How do I link a cell to show me what was selected on an input form?
    By csalcido in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2013, 01:00 PM
  2. Multiple input forms to Master file
    By LeBaron in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2012, 05:05 PM
  3. automating input in forms training matrix
    By ardana in forum Excel General
    Replies: 2
    Last Post: 03-20-2012, 08:27 AM
  4. Input Data using Forms
    By cneff in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-09-2011, 01:42 AM
  5. Input Forms
    By LAB2007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2007, 05:16 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