Consulting

Results 1 to 3 of 3

Thread: Ensure selected cell is filled before proceed to VBA language

  1. #1
    VBAX Regular
    Joined
    Nov 2013
    Posts
    23
    Location

    Ensure selected cell is filled before proceed to VBA language

    Hi,


    I will like to ensure that cell A1:A9 and C1 is filled before proceed to another VBA language.
    Please help on the VBA language as it is not working.

    If Sheets("Sheet1").Range("A1:A9").Value = "" Then
            MsgBox Title:="Warning", Prompt:="Please fill-up the Empty Cell in-order to proceed"
            Exit Sub
    End If
    
    
    If Sheets("Sheet1").Range("C1").Value = "" Then
            MsgBox Title:="Warning", Prompt:="Please fill-up the Empty Cell in-order to proceed"
            Exit Sub
    End If

    Thanks

  2. #2
    VBAX Mentor
    Joined
    Jul 2012
    Posts
    398
    Location
    Sub a()
    For Each cell In Sheets(1).Range("A1:A9")
    If cell = "" Then
        MsgBox Title:="Warning", Prompt:="Please fill-up the Empty Cell in-order to proceed"
        Exit Sub
    End If
    Next
    End Sub

  3. #3
    VBAX Regular
    Joined
    Nov 2013
    Posts
    23
    Location
    Thanks patel
    Code that provided is working. :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •