VBA form question

dosman

New Member
Joined
Jan 24, 2019
Messages
35
I have created a 23 column spreadsheet with data validation cells using drop down lists and a few columns that do the standard date formatting (4/18/19 displays as Thursday, April 18, 2019)

Converting it to a table is not desirable and I would love to have a user form that "pulls" the validations from the existing cells in 2 sheets. Once the form creates the next row in the sheet I need to be able to go back and adjust values in the drop down lists without having to use the form which I only need to create a new row of data.

I am not a VB coder (although I am learning) but this is above my current pay grade. I do not know if the form would require me to clear the validation from a cell to allow it to do its magic or if the form can merely mirror the validations and formatting that already exist. I need the drop downs to still be functional once the form creates the row.

The form would only require a button on the main sheet labeled "New Job" with an "Add" button at the bottom. I can create the form using the VBA editor but am not sure of the code to insert.

I am more than willing to share the spreadsheet for analysis if anyone can help.

Best regards to an awesome community.
 
Last edited:
I will do this later today. The holiday has me busy. This is looking very promising! I cannot thank you enough for taking time on a weekend to help me.
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Do not worry, it's just an advance. Enjoy your holidays.
 
Upvote 0
I just inserted the code and it looks great! I have 2 comments

I noticed the Page Rate choices in the form do not reflect accurate numbers after 4.4

The date submitted field in the form should not be required to add the record as this is usually entered after the "job" has been added. That is my error for not clarifying.

Best regards
 
Upvote 0
I just inserted the code and it looks great! I have 2 comments

I noticed the Page Rate choices in the form do not reflect accurate numbers after 4.4

The date submitted field in the form should not be required to add the record as this is usually entered after the "job" has been added. That is my error for not clarifying.

Best regards


Where do not they reflect exact numbers, in the textbox on the sheet?

And Only remove the validation:


Code:
    If TextBox2.Value = "" Or Not IsDate (TextBox2) Then
        MsgBox "Enter a date", vbExclamation
        TextBox2.SetFocus
        Exit Sub
    End If
 
Upvote 0
My apologies for the late reply. It was in the drop down list on the form where I choose the page rate. if you look at the page rate validation I should be able to choose from 3.25 up to 5.00 in increments of .25. In the form it stops at 4.4 and starts adding long decimal numbers. I will fix the validation with the code you sent. Thank you!
 
Upvote 0
My apologies for the late reply. It was in the drop down list on the form where I choose the page rate. if you look at the page rate validation I should be able to choose from 3.25 up to 5.00 in increments of .25. In the form it stops at 4.4 and starts adding long decimal numbers. I will fix the validation with the code you sent. Thank you!


Did you see what I was referring to? Since this is in development I know it's probably an easy fix. Thanks again
 
Upvote 0
Enter the excel options and activate: Precision as displayed

calculation-precision-as-displayed.png
 
Upvote 0
I apologize for getting back to you do late. I really think the form is going to work as you submitted in the advance unless you think it is not. My only question is how to invoke the form from the main sheet with a button. I do not see any modules to call.

Thanks again for your assistance
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,198
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top