Hi.
I need to return to the Textbox's values according to ComboBox1 (el dira the tab name, to return) and ComboBox2 (he will tell you the date the information is returned).
does not work
Cross-PostCode:Private Sub ComboBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean) Dim vrNum As String Dim vr1 As String Dim qt As Integer qt = Sheets(ComboBox1.Text).[A3].CurrentRegion.Rows.Count Application.EnableEvents = False On Error Resume Next vrNum = CDate(Me.ComboBox2) If vrNum = "" Then MsgBox "Insira uma data valida" Me.ComboBox2 = "" Application.EnableEvents = True Exit Sub Else On Error Resume Next vr1 = Application.WorksheetFunction.VLookup(vrNum, Worksheets(ComboBox1).Range("A3:G" & qt), 2, 0) '=PROCV Me.TextBox1 = vr1 If vr1 = "" Then MsgBox "não possui faturamento." End If Application.EnableEvents = True End If End Sub
http://www.thecodecage.com/forumz/mi...ext-boxes.html
Thank you!!


Reply With Quote
