New to VBA and need help

  • Ok, so I have been looking around the internet for days trying to figure out how to write the correct code for my issue. It seems really complex to me and being new to VBA I am struggling....I don't have any code that works what so ever at this point in time. so here is the issue.


    I have a worksheet (Input Form) that is receiving data from a userform (This is working great). The Worksheet is laid out like this:



    Now the first user input form provides data for: Activity ID, Company, Task, Area, Resp Per, Mon Planned Crew through Sun Planned Crew, Start Date, Duration, and Planned Finish. The Start Week and End Week data is calculated by an IF function that reads a separate Worksheet.


    I have created another userform that I want to use to add data to specific record based on selections made by a user on the userform:


    What I am looking for is the Weekly Work Plan Number to be assigned its value from a Worksheet called WWP Cell "C7", then the user can select the Company they want (from the spreadsheet) using the Trade Filter, then select the task they want to update information for.


    Once all the filters are selected (Weekly Work Plan Number [given by worksheet(WWP) cell (C7), Trade Filiter (Company), and selected a task to update) specific data from the worksheet (Input Form) will be displayed for reference (Task Start Date and Planned Duration).


    The user would then input a number into the text box for one or all of the days. After which they would hit a submit button and the information they entered in the Number of Assigned Worker Boxes would populate in correct record based on the filtered data in the Mon Actual Crew - Sun Actual Crew columns in the Worksheet (input forms).


    I would be grateful for any help that can be given.

  • I need a good luck at the code and I'm going out now so I'll get back to you tomorrow.


    First thing though is this in the initialize code


    Each line is unnecessary because by default the TextBoxes will be empty on initializing.


    I can see a few other changes I will suggest.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!