+ Reply to Thread
Results 1 to 5 of 5

How to check if a selected single-cell range (obtained from inputbox) has a blank value?

  1. #1
    Registered User
    Join Date
    11-03-2006
    MS-Off Ver
    365
    Posts
    63

    How to check if a selected single-cell range (obtained from inputbox) has a blank value?

    I have a bit of code where I ask the user to select a single cell. If that cell is empty, then, it should prompt the user to try again.

    Does anyone know how to properly do something like this (as-is, this throws and application-defined or object-defined error):

    Please Login or Register  to view this content.
    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: How to check if a selected single-cell range (obtained from inputbox) has a blank valu

    Something like this maybe ?
    Please Login or Register  to view this content.

  3. #3
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: How to check if a selected single-cell range (obtained from inputbox) has a blank valu

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Try this !


    As a VBA beginner starter :

    PHP Code: 
            Dim Rg As RangeM$
        Do
            
    Set Rg Nothing
            On Error Resume Next
            Set Rg 
    Application.InputBox("Player 1, choose the next answer"Type:=8)
            
    On Error GoTo 0
            
    If Rg Is Nothing Then Exit Sub
            M 
    IIf(IsEmpty(Rg) Or Rg.Count 1"Same player shoot again !" vbLf vbLf"")
        
    Loop Until M "" 
    ► Do you like it ? ► ► So thanks to click on bottom left star icon « Add Reputation » ! ◄ ◄

  5. #5
    Registered User
    Join Date
    11-03-2006
    MS-Off Ver
    365
    Posts
    63

    Re: How to check if a selected single-cell range (obtained from inputbox) has a blank valu

    Thanks for the help all; this should really improve my Jeopardy game

+ 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. [SOLVED] Check if any cell in range is blank
    By Undo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2019, 03:34 PM
  2. Advanced Filter, Range selected via InputBox
    By Spy-101 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-20-2018, 05:01 PM
  3. Replies: 2
    Last Post: 03-24-2016, 10:55 AM
  4. [SOLVED] Copy a single selected value from a ListBox into an active cell or range
    By ElianaMG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-08-2015, 09:30 AM
  5. Replies: 1
    Last Post: 03-15-2014, 05:44 AM
  6. Highlight blank cell in a selected range of a sheet
    By ROHAN999 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-20-2013, 08:50 AM
  7. Replies: 2
    Last Post: 03-07-2012, 03:16 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