Hi All,
I am need of suggestion/debug on below part of code, as i unable to understand why code is not assigning event.
Query is i have 1 list box in that list for some value we required textbox and based on that label and textbox will visible and the position of label and text box is not fixed and for the last value of denied reason list we have 3 text box respectively and i want to add keydown event to that textbox below is the code for that.
Click on EOP Notes tab --> Click on Denied reason and click on value from the list and for last 2 value we have text box and in that user will enter date, once user enter date the date format should be change to (dd-mmm-yyyy).
![]()
'=======================Assigning Event to Multiple Text Box Events========================== lb = 0 For i = 1 To 5 If Frame3.Controls("Lbl" & i).Caption <> "" Then If Frame3.Controls("Lbl" & i).Caption = " Audit Closure (Member) - Please Enter Dates(mm/dd/yyyy)" Then For j = 1 To 3 Set Obj = Frame3.Controls("TextBox" & i & j) MsgBox Obj.Name If TypeOf Obj Is MSForms.TextBox Then TextBoxCounter = TextBoxCounter + 1 ReDim Preserve TextBoxes(1 To TextBoxCounter) Set TextBoxes(j).TextBoxEvents = Obj 'at this line i am getting error End If Next lb = lb + 1 End If End If Next '=============================================================================
Bookmarks