Userform - Vba not working

  • Good to hear it is helping you out :)


    The whole idea is to design a sample file which you can use and adapt to your specific situation ... ;)


    Thanks a lot for your Thanks AND for the Likes 8)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • I warn those who will use this file

    If you do find and delete data without closing the userform after adding data, it gives an error. You need to close and open the userform window, then you can find and delete the data you want.

    it doesn't matter to me

    If you press delete with the userform empty, it gives the same error.

    Code
    'DataBase Row was selected by ListBox1_Click
    dbRow = Application.Match(ListBox1.List(r, 0), Mysheet.Range("A1:A" & lastrow), 0)
    'Delete Entire Row



    Error Message

    Run-time error '13'

    Type mismatch

    Edited once, last by ozex11 ().

  • Feel free to come back to the Forum for the modifications your Users might need ... :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Hello,


    After all your tests, if you are OK with the solution, you can Mark the thread As Resolved :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Merhaba,


    Tüm muayenenizden sonra, çözüm boyutuna uygunsa, Konuyu Çözüldü Olarak İşaretleyebilirsiniz < img src="https://forum.ozgrid.com/images/smilies/emojione/263a.png" alt=":)" class="smiley" srcset= "https://forum.ozgrid.com/images/ ifadeler/emojione/[email protected] 2x" genişlik="23" yükseklik="23">

    Sure, but I have a question I want to ask.

    Hello,


    Yes it can be "prevented" .... ;)


    Attached is your modified file

    With which code do we do this operation, if I encounter such a situation again, I am asking you in order not to disturb you.

  • Hello,


    In order NOT to see a worksheet, you have two possibilities:


    1. Change its status, for example : Sheet3.Visible =xlSheetHidden

    or

    2. If during your code you have selected a sheet to work Sheet2.Activate, then, before the end of you macro, use: Sheet1.Activate


    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • You are welcome :)


    Will mark the thread as resolved.

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!