+ Reply to Thread
Results 1 to 8 of 8

Problem with userform code

  1. #1
    Forum Contributor
    Join Date
    12-01-2022
    Location
    Rhodes,Greece
    MS-Off Ver
    office 2021
    Posts
    204

    Problem with userform code

    I have created this userform bymyself with a lit of help from internet articles.
    the task is when i run the module it pops up the userform.i am selectin an area that i like(in this sheet the range("b2:f14") and when i press the command button with the caption BLANK CELLS it gives me an error
    Where is my mistake in the code?
    Thank you in advance
    Attached Files Attached Files

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Problem with userform code

    Remove minus 1 from here:

    Please Login or Register  to view this content.
    and BTW so far You have count NO empty cells and display as XX empty cells.
    Last edited by KOKOSEK; 03-27-2024 at 06:46 AM.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: Problem with userform code

    Could you not just use evaluate?

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-01-2022
    Location
    Rhodes,Greece
    MS-Off Ver
    office 2021
    Posts
    204

    Re: Problem with userform code

    Quote Originally Posted by KOKOSEK View Post
    Remove minus 1 from here:

    Please Login or Register  to view this content.
    and BTW so far You have count NO empty cells and display as XX empty cells.
    thank you very much for your answer.the code now is not giving me an error but is giving me wrong results.
    when you say i don't count empty cells but xx empty cells what do you mean?

  5. #5
    Forum Contributor
    Join Date
    12-01-2022
    Location
    Rhodes,Greece
    MS-Off Ver
    office 2021
    Posts
    204

    Re: Problem with userform code

    Quote Originally Posted by ByteMarks View Post
    Could you not just use evaluate?

    Please Login or Register  to view this content.
    thank you very much my friend .this code worked perfectly

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Problem with userform code

    Quote Originally Posted by kvemperor View Post
    is giving me wrong results.
    when you say i don't count empty cells but xx empty cells what do you mean?
    I mean, you count NOT EMPTY CELLS

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and display message about counted EMPTY CELLS.

  7. #7
    Forum Contributor
    Join Date
    12-01-2022
    Location
    Rhodes,Greece
    MS-Off Ver
    office 2021
    Posts
    204

    Re: Problem with userform code

    Quote Originally Posted by KOKOSEK View Post
    I mean, you count NOT EMPTY CELLS

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and display message about counted EMPTY CELLS.
    Ι understant now what you say.thank you very much

  8. #8
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Problem with userform code

    You welcome.
    Happy to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Requesting a review of my UserForm code, and one slight problem
    By juanzo007 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2021, 03:10 PM
  2. [SOLVED] Problem code tranfer data from userform to sheet2
    By ABDELFATTA in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-04-2019, 01:05 PM
  3. problem vba code for multiselect listbox (userform)
    By mariec_06 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2016, 10:52 AM
  4. VBA userform problem with code (syntax error)
    By Odowd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-27-2016, 09:23 PM
  5. Need advice, code problem - Userform
    By jsneak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2013, 07:18 AM
  6. Problem with Userform and different code modules
    By Jos Vens in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2005, 05:06 PM
  7. Problem running code behind a userform
    By cdb in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 02-10-2005, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1