+ Reply to Thread
Results 1 to 11 of 11

VBA Code warning message ANY empty blank cell Entire worksheet

  1. #1
    Registered User
    Join Date
    02-12-2013
    Location
    Portland, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    7

    VBA Code warning message ANY empty blank cell Entire worksheet

    Hi All,

    I am extremly new to using VBA and Macros. I do not understand the code, but want to learn. I will attempt to explain what I would like VBA code for and what I would like it to accomplish.

    I have a Data Worksheet that is the Data portion of my Pivot Table.

    I want the user to be warned with a popup message when they tab without filling in data in that and any other cell in the worksheet. I have googled for probably 8 hours and cannot find this exactly and am not smart enough to figure out the code to modify what I have found at this point.

    Please help.

    My worksheet is named Data and my Pivot Table (if you need that) is named Pivot

    Thanks in advance for any and all help!

  2. #2
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: VBA Code warning message ANY empty blank cell Entire worksheet

    Where you need this message in worksheet or pivotable?

  3. #3
    Registered User
    Join Date
    02-12-2013
    Location
    Portland, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA Code warning message ANY empty blank cell Entire worksheet

    In the Worksheet named Data.

    I will explain a little more, as I re-read my original post and I am not sure it was clear.

    The user will enter data in each row and if they fail to enter in one cell I would like the error message to pop up.

    Thanks in advance!
    Last edited by RyanTExcel; 02-14-2013 at 01:18 PM. Reason: clarity

  4. #4
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: VBA Code warning message ANY empty blank cell Entire worksheet


  5. #5
    Registered User
    Join Date
    02-12-2013
    Location
    Portland, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA Code warning message ANY empty blank cell Entire worksheet

    I read through this thread you provided and am probably doing it wrong.

    I press Alt F11 or right click on "Data" (name of my worksheet) copy and paste the following code:

    Sub Example()
    Dim cell As Range

    For Each cell In Range("Data")
    If IsEmpty(cell) Then
    MsgBox ("Empty Cells exist") 'actions To Do If True
    End If
    Next
    End Sub

    It does not work when I go to my worksheet

  6. #6
    Registered User
    Join Date
    02-12-2013
    Location
    Portland, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA Code warning message ANY empty blank cell Entire worksheet

    The Excel Forum server was having problems when I posted this. Can someone please analyze my code and see what I am doing wrong. Please read from start.

    I tried something like this as well, but it didn't work either.

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cell As Range
    If IsEmpty(PrevCell) Then
    MsgBox ("Please fill in all cells") 'actions To Do If True
    End If
    Next
    End Sub

  7. #7
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: VBA Code warning message ANY empty blank cell Entire worksheet

    Try
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-12-2013
    Location
    Portland, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA Code warning message ANY empty blank cell Entire worksheet

    It pops up with the message whether the previous cell was empty or not, so this is not working. I am not sure the "change" code is the correct way to go about this. Thanks for trying. Any other suggestions?

  9. #9
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: VBA Code warning message ANY empty blank cell Entire worksheet

    Post a example of what you looking to do

  10. #10
    Registered User
    Join Date
    02-12-2013
    Location
    Portland, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA Code warning message ANY empty blank cell Entire worksheet

    Ok, here is my worksheet. Data, Data Links (for Data validation list drop downs), and Pivot Table.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    02-12-2013
    Location
    Portland, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA Code warning message ANY empty blank cell Entire worksheet

    Please see attached file and read previous thread.

    Please help!

+ 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