flag empty value in textbox

  • Re: flag empty value in textbox


    dont know why but its not working.
    if i leave every textbox empty and just press the Updateb1_Click() then all the targeted cells turns to 0
    also these targetd cells wont update even if i put in number bigger then 0.

  • Re: flag empty value in textbox


    Another attempt



    Shame is ... I cannot perform any tests ...

    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 :)

  • Re: flag empty value in textbox


    it works partly , crazy runtime though looks like the loop is really heavy on it.
    sorry i cannot attach the worksheet as info is sensitive.

  • Re: flag empty value in textbox


    Crazy runtime can be related to many issues ... including the size of your workbook, the complexity of your userform, etc ....


    Take a look at the ten tip to speed up your macros ...


    http://datapigtechnologies.com/blog/index.php/ten-things-you-can-do-to-speed-up-your-excel-vba-code/

    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 :)

  • Re: flag empty value in textbox


    Quote from Carim;786780

    Crazy runtime can be related to many issues ... including the size of your workbook, the complexity of your userform, etc ....


    Take a look at the ten tip to speed up your macros ...


    http://datapigtechnologies.com…d-up-your-excel-vba-code/


    carim!
    thank you for all your help so far
    i used the Application.Calculation = xlCalculationManual


    and its now works flawlessly.


    ill do few more tests and will update. thanks again!

  • Re: flag empty value in textbox


    Glad you could progress on your project ...:wink:


    Thanks for ... your thanks ...:smile:


    All the Best for the next steps !!!

    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 :)

  • Re: flag empty value in textbox


    carim another maybe simple issue i have here


    i also now have textbox1 to textbox14 to add values which supposed to do the same action , and now plant the values the column before ( s1.Cells(i, 5)) how to do this?


    i thought i could do by same idea only call another variable with negative value - but it wont work on the line i marked *****


  • Re: flag empty value in textbox


    Hello,


    You could test following



    HTH

    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 :)

  • Re: flag empty value in textbox


    LOL. im looking at your coding and feeling embraced for the noob sulotion i wrote


    thanks again carim :)

  • Re: flag empty value in textbox


    You are welcome ...:wink:


    " Every step teaches us to learn something New ... " :smile:

    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!