+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : if no visible cells then...msbox!

  1. #1
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    if no visible cells then...msbox!

    i have a macro that filters a list of data based on user input. if the user mistypes the information then it errors out, which is good, but i would like to clean it up so its not still filtered when it errors out. so if it filters a list, and cant find anything, then it displays a msgbox, and unfilters the sheet.

    Please Login or Register  to view this content.
    Last edited by GaidenFocus; 12-01-2010 at 06:37 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: if no visible cells then...msbox!

    Like so:
    Please Login or Register  to view this content.

    Change Field:=1 to the correct column where the PO numbers are.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: if no visible cells then...msbox!

    Thanks but maybe i should of mentioned i was using userforms... here is the code im using.


    this code works like i need it to, i want it to tell me i screwed up the po number instead of asking me to debug it.
    Please Login or Register  to view this content.
    Last edited by GaidenFocus; 12-01-2010 at 02:14 PM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: if no visible cells then...msbox!

    Maybe this, can't really test it blind:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: if no visible cells then...msbox!

    yea that works great. now alls i have to worry about is mistyping the PO and its actually on the list. but that should be easy to spot once it prints out. thanks man!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: if no visible cells then...msbox!

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  7. #7
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: if no visible cells then...msbox!

    can i not wait to use it a few times and see if everything runs smoothly? or is that against the rules?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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