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:
Any help is welcomed. Thank you
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