Target date calculator using UserForm

icsiszer

New Member
Joined
Jul 10, 2018
Messages
3
Hello all,

I'm novice VBA user :)
I'm trying to make an UserForm that helps to get the Target Date for our translators. I have a Table1 where we store all the ongoing translations with agreed target dates. Based on this table I would like to set up an UserForm where they can select the name and input the total number of characters and after they can see the total needed days to perform the translation. By pressing the Calculate button they should see the proposed target date based on the info from Table1.

Example. If for translator yyyyyyy the already agreed target date is 15.05.2020 and the new translation has 25000 chars ad it need 15 days to translate it it means that the result in the Target Date field should be 5.06.2020

I have two issues so far:
- the Days field is not filling out automatically, only after I go through it with TAB
- after pressing the calculate button I receive an error 451

Codes used:
VBA Code:
Private Sub days_Change()
days.Text = Round((Val(no_char.Text) / 1500), 0)
End Sub

Private Sub Calculate_Click()
Me.target_date.Value = Application.WorksheetFunction.Workdays(Application.WorksheetFunction.MaxIfs([Table1].ListObject([Target date]), [Table1].ListObject([translator]), Me.translators.Value), Me.days.Value)
End Sub

Any help is welcomed. Thank you
 

Attachments

  • form.png
    form.png
    11.3 KB · Views: 5
  • error.png
    error.png
    10.3 KB · Views: 5

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,214,918
Messages
6,122,252
Members
449,075
Latest member
staticfluids

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