Hello once again.
I have a user form that gets data from one sheet and i want to edit that data and save it back to the same exact place.
the code I have works fine but while saving from the userform to the cell it wont work.
Here's the code I have to populate the userform:
It's a 2 pages userform.
the code for the save button:
The problem is, what I'm typing into the userform are dates. 01-01-2019 for exemple. the userform inserts the right date exactly how I type inside the userform but then I have a condition formating and it wont assume the date entered in the respective cell unless I type manually inside that cell. Then the conditional formatting will work.
this is what I'm trying to achieve:
If I type the dates 01-01-2019 and 15-01-2019 with the userform it wont turn green.
Best regards,
eLy
I have a user form that gets data from one sheet and i want to edit that data and save it back to the same exact place.
the code I have works fine but while saving from the userform to the cell it wont work.
Here's the code I have to populate the userform:
Code:
Private Sub UserForm_Initialize() Me.StartUpPosition = 0
Me.Top = (Application.Height - Me.Height) / 2
Me.Left = (Application.Width - Me.Width - 500)
'first tab
Me.tbA1i = sheets("ferias").Range("D7").Value
Me.tbA1f = sheets("ferias").Range("E7").Value
'second tab
Me.tbA2i = sheets("ferias").Range("D8").Value
Me.tbA2f = sheets("ferias").Range("E8").Value
End Sub
It's a 2 pages userform.
the code for the save button:
Code:
Private Sub CommandButton1_Click()
sheets("ferias").Range("D7").Value = Me.tbA1i
sheets("ferias").Range("E7").Value = Me.tbA1f
sheets("ferias").Range("D7").Value = Me.tbA2i
sheets("ferias").Range("E7").Value = Me.tbA2f
End Sub
The problem is, what I'm typing into the userform are dates. 01-01-2019 for exemple. the userform inserts the right date exactly how I type inside the userform but then I have a condition formating and it wont assume the date entered in the respective cell unless I type manually inside that cell. Then the conditional formatting will work.
this is what I'm trying to achieve:
If I type the dates 01-01-2019 and 15-01-2019 with the userform it wont turn green.
Best regards,
eLy
Last edited: