+ Reply to Thread
Results 1 to 7 of 7

MsgBox not returning data within cells

  1. #1
    Registered User
    Join Date
    07-15-2013
    Location
    GA, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    MsgBox not returning data within cells

    PURPOSE OF MACRO:
    Hey everyone! I have a simple macro that compares dates in a column to certain words in the following column, as shown below. The end result should be the oldest date that matches the proposed "Phrase1".

    ISSUE:
    This worked Friday, but I accidentally saved it as a .xlsx, thus deleting the macro. I redid it today and for some reason MsgBox is now not returning the date within the cell (10, 3), or data from any cell for that matter. It simply returns a MsgBox that contains "00:00:00". What is my issue?



    Please Login or Register  to view this content.
    Last edited by Sighter; 07-15-2013 at 09:36 AM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: MsgBox not returning data within cells

    what is in C10?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    07-15-2013
    Location
    GA, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: MsgBox not returning data within cells

    The following date: 7/11/2013. I've tried formatting the cell as "General" and as "Date". Neither option solved the issue.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: MsgBox not returning data within cells

    is the code in a worksheet module that is not Sheet1?

  5. #5
    Registered User
    Join Date
    07-15-2013
    Location
    GA, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: MsgBox not returning data within cells

    I am a complete idiot. I'm sorry for wasting your time. You inadvertantly made me realize I had my x's and y's reversed! It should be (n, 10) not (10, n)! Thank you

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: MsgBox not returning data within cells

    Quote Originally Posted by Sighter View Post
    You inadvertantly made me realize
    that's actually why I said C10 and not Cells(10, 3) ;-)

    you're welcome

  7. #7
    Registered User
    Join Date
    07-15-2013
    Location
    GA, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: MsgBox not returning data within cells

    Well thank you very much! I've already wasted 2.5 hours on this stupid issue.

+ 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. Data being cleared in cells when OK pressed on msgbox
    By SChapman in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 06-08-2013, 06:44 AM
  2. Finding matching cells then returning data of another cell
    By GenericPat in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 11-19-2012, 03:36 PM
  3. Vlookup macro based on 2 values returning msgbox
    By bd528 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2010, 09:16 AM
  4. reducing decimal points when returning value in msgbox
    By tanbio in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2006, 09:28 AM
  5. Validate MsgBox Entry to Data in Cells
    By David in forum Excel General
    Replies: 14
    Last Post: 12-21-2005, 06:35 PM

Tags for this Thread

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