Hi Everyone,
I was hoping someone could help me with an issue I'm having on my Userform;
Userform = frmWeeklyWages
Combobox = cbbWeekEnding (Row source is Column "R" from "Formulas" worksheet)
TextBox = txtWeek
I would like to select a week (displayed as a date) from the combobox, then based on my selection, update the Textbox to show the financial week number (which is Column "Q" in "Formulas" worksheet, so Offset 0, -1? )
My current best attempt so far is;
This at least allows me to select the date, but it isn't updating the textbox? Im very new to VBA so hoping your more experienced eyes can spot the issue! Thanks
I was hoping someone could help me with an issue I'm having on my Userform;
Userform = frmWeeklyWages
Combobox = cbbWeekEnding (Row source is Column "R" from "Formulas" worksheet)
TextBox = txtWeek
I would like to select a week (displayed as a date) from the combobox, then based on my selection, update the Textbox to show the financial week number (which is Column "Q" in "Formulas" worksheet, so Offset 0, -1? )
My current best attempt so far is;
Code:
Private Sub cbbWeekEnding_Change()
Dim Found As Range, LastRow As Long
cbbWeekEnding.Value = Format(cbbWeekEnding, "dd/mm/yyyy")
Set Found = Worksheets("Formulas").Columns(18).Find(what:=frmWeeklyWages.cbbWeekEnding.Value, LookIn:=xlValues, lookat:=xlWhole)
If Found Is Nothing Then Exit Sub
Me.txtWeek.Text = Worksheets("Formulas").Cells(Found.Row, Found.Column).Offset(0, -1).Value
This at least allows me to select the date, but it isn't updating the textbox? Im very new to VBA so hoping your more experienced eyes can spot the issue! Thanks