+ Reply to Thread
Results 1 to 5 of 5

macro to display a msgbox

  1. #1
    Registered User
    Join Date
    12-18-2013
    Location
    chennai,india
    MS-Off Ver
    Excel 2010
    Posts
    24

    macro to display a msgbox

    Hi all,

    i need a help to display a msgbox if the condition used for search is wrong .the msg box should display a message as"wrong entry try again" with a retry button in it.
    pl refer the attached xls file.
    the existing is a result of search for 'x'' done if its wrong it has to display the error msg.
    pl run the macro to get an idea about the search.

    Thanks
    sanyaa
    Attached Files Attached Files

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: macro to display a msgbox

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-18-2013
    Location
    chennai,india
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: macro to display a msgbox

    Hi,

    It worked on displaying the message box.May I please know which line of the above code states about the selection of the data range in Release record for search.My actual data sheet has 9000+ rows of data .so when i searched for a data from row 3000+ its showed the message "try again" .Please educate on the code error.

    Thanks in advance.
    sanyaa

  4. #4
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: macro to display a msgbox

    Use Debug.Print to find search ranges. After running, look in the Immediate window for debug.print output.

    Note that you might want to use a UsedRange rather than CurrentRegion as the latter stops at the first blank row.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-18-2013
    Location
    chennai,india
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: macro to display a msgbox

    Hi Kenneth,
    Thanks for your input.It worked.My xls file had blank rows inbetween clearing that it worked with current region.

    Thanks a lot.
    sanyaa

+ 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. Display Msgbox on 1st of Every Month
    By rbuthello in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2008, 01:13 AM
  2. Display names in MsgBox
    By kingdt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2007, 10:53 AM
  3. [SOLVED] Display Totals In MsgBox
    By Pete in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-06-2006, 10:25 AM
  4. MsgBox Display
    By Michael S. in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2005, 06:05 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