Posts by haroon2015

    i m using a userform to find data, edit data and update data.....when i click
    CommandButton2 to update data an error is comming


    Run-time error '13':

    Type mismatch

    need help

    Hello evryone

    i using two macro to filter and unfilter the my data

    i want to use a button to activate both

    1 = ALL_IN_ONE

    plz combine above with one button....Once i click the button activate the first again i click the button then activate the second.....

    thanx a lot

    hello evryone
    i m using this code to connect textbox5, and textbox6 with textbox4
    i mean what i add in textbox4, its also shows on textbox5, and textbox6

    but i want a condition in this code
    IF my combobox1.value = "H IMRAN G" then
    textbox5 and textbox6 value = textbox4.value + 1

    Attached file

    Hello evryone

    I m using a userform to add data entry using multiple condition

    =I want if i type a new name which is not in ComboBox1 list then a msgbox appear and ask for the ( yes or no ) if
    i click yes then new name add to the ComboBox

    thanx a lot

    sir i need this code correctly.........."Updating Validation List"
    In this code only Cell "$A$13" worked.....i need this code working in range A13:A1000

    code :
    Option Explicit
    Dim strOriginalEntry As String
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim iReply As Integer
    If Target.Cells.Count > 1 Then Exit Sub
    If Target.Address = "$A$13" And Target <> vbNullString Then ' Change to Validated cell
    If WorksheetFunction.CountIf(Range("Names"), Target) = 0 Then 'New Name
    Application.EnableEvents = False 'Prevent Change Event Firing again while code is running.
    'Ask if they wish to add the name or not.
    iReply = MsgBox("The name " & Target & _
    " is not part of the list, do you wish to add it.", _
    vbYesNoCancel + vbQuestion, "Com.Com")
    If iReply = vbCancel Then 'Cancelled so restore orginal text
    Target = strOriginalEntry
    ElseIf iReply = vbNo Then
    'Don't add to list. That is do nothing
    Else 'Add the new name to the cell below the last name in the named range "Names"
    Range("Names").Cells(1, 1).End(xlDown)(2, 1) = Target
    End If
    End If
    End If
    Application.EnableEvents = True 'Allow Events
    End Sub

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    'Pass orginal Text to the Module level Variable "strOriginalEntry"
    If Target.Address = "$A$13" Then strOriginalEntry = Target
    End Sub