VBA Code to complete a part finished project
- or -
Post a project like this1492
£36/hr(approx. $45/hr)
- Posted:
- Proposals: 4
- Remote
- #2753767
- Awarded
Description
Experience Level: Expert
Estimated project duration: 1 - 2 weeks
I have designed a UserForm that I wish to use for data entry in my workbook and I am looking to code my “Submit Data” CommandButton (CommandButton2) to do this. My form has 4 Comboboxes with dropdown lists and what I would like to do is have the input from textboxes put into the workbook dependent upon the values showing in the ComboBoxes. The input from the text boxes would go into columns B, D, E etc. The destination sheet would be dependent upon the value of ComboBox3, and the row is dependent upon the value of Combobox2 and ComboBox4. In addition, whether the value of ComboBox4 is “First” or “Second”, a “1” is put into column C (on the relevant row as previously described) but when “Second” is the value of Combobox4 the contents of the textboxes is put in the row below in columns D, E etc. with column/cell B being left blank.
The text boxes destinations are columns:
TextBox 1 - B (in one case), Text Box 2 – D, TextBox 3 – E, Text Box 4 – J, TextBox 5 – L, Text Box 6 – M, TextBox 7 – N, Text Box 8 – O, TextBox 9 – Q, Text Box 10 – R, TextBox 11 – S, Text Box12 – T, TextBox 13 – AC, Text Box 14 – AD, TextBox 15 – AE, Text Box 16 – AF, TextBox 17 – AJ, Text Box18 – AK, TextBox 19 – AL, Text Box 20 – AM, TextBox 21 – AN, Text Box 22 – AO, TextBox 23 – AP, Text Box 24 – AQ, TextBox 25 – AR
For example, if the ComboBox values are: County Championship, Somerset (a), TR Ambrose, and First the textbox data would be submitted to: the sheet named “TR Ambrose”, on the row that has “Somerset (a) in (that is within a range of A4:A31). Other competition types are within separate ranges, A57:A77 etc.). I have put some sample data into the first two of the sheet 'TR Ambrose'
Each “player’s” worksheet is identical except for the name of the sheet (which is the player’s name).
The code is required for the “Submit Data” button. The Clear Form and Close buttons are coded and work.
I have removed the sheets for Players 26 – 60 to reduce the size of the workbook.
The text boxes destinations are columns:
TextBox 1 - B (in one case), Text Box 2 – D, TextBox 3 – E, Text Box 4 – J, TextBox 5 – L, Text Box 6 – M, TextBox 7 – N, Text Box 8 – O, TextBox 9 – Q, Text Box 10 – R, TextBox 11 – S, Text Box12 – T, TextBox 13 – AC, Text Box 14 – AD, TextBox 15 – AE, Text Box 16 – AF, TextBox 17 – AJ, Text Box18 – AK, TextBox 19 – AL, Text Box 20 – AM, TextBox 21 – AN, Text Box 22 – AO, TextBox 23 – AP, Text Box 24 – AQ, TextBox 25 – AR
For example, if the ComboBox values are: County Championship, Somerset (a), TR Ambrose, and First the textbox data would be submitted to: the sheet named “TR Ambrose”, on the row that has “Somerset (a) in (that is within a range of A4:A31). Other competition types are within separate ranges, A57:A77 etc.). I have put some sample data into the first two of the sheet 'TR Ambrose'
Each “player’s” worksheet is identical except for the name of the sheet (which is the player’s name).
The code is required for the “Submit Data” button. The Clear Form and Close buttons are coded and work.
I have removed the sheets for Players 26 – 60 to reduce the size of the workbook.
Mel S.
100% (5)Projects Completed
2
Freelancers worked with
1
Projects awarded
100%
Last project
6 Oct 2021
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies