+ Reply to Thread
Results 1 to 5 of 5

VBA To Notify if Cell is Empty

Hybrid View

  1. #1
    Registered User
    Join Date
    06-16-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question VBA To Notify if Cell is Empty

    Hi,

    I need VBA to give error message if certain cells are emply, I created a VBA but its not working.

    Sub CALCULATE ()
    If Cells(13, 8) = """" Then
    MsgBox "PLEASE ENTER THE NAME"
    End If

    End Sub

    This VBA should give Error Message if the specific cell is left blank, but its not working. Kindly rectify the error.

    Rgds
    ExcelMaster2012

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: VBA To Notify if Cell is Empty

    When do you run that sub?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-16-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: VBA To Notify if Cell is Empty

    Sir

    Instead of Correcting above VBA, Can u send me a new one, I need a VBA which should notify if a cell is empty when i run the VBA. you can give an example, I will change Rowindex and ColumnIndex and use it. I will create a Button and link it. You can give default name as "Control" for that sub.


  4. #4
    Registered User
    Join Date
    06-20-2012
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: VBA To Notify if Cell is Empty

    If you checking sheet1 you have to use this sub:

    Sub Control()
    If Sheet1.Cells(13, 8).Text = "" Then
    MsgBox "PLEASE ENTER THE NAME"
    End If
    End Sub

  5. #5
    Registered User
    Join Date
    06-16-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: VBA To Notify if Cell is Empty

    Dear sir,

    Many many thanks to you, it worked well.

+ 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