Inputbox Type 4 Get A Boolean Response

less than 1 minute read

InputBox Type 4 – get a boolean response

'==================================================================================================
' ## InputBox Example 7: (Type 4) - Inputbox to get a boolean response
'==================================================================================================
Sub InputBoxBoolean() '// Vars Dim blnAns As Boolean '// Boolean prompt, 1 = true, 0 = false blnAns = Application.InputBox(Prompt:="Acceptable Answers: 1/True or 0/False" & vbCr & _ "1 = True, 0 = False", Title:="Boolean Example", Type:=4) '// Test for True or False If blnAns = True Then MsgBox "You have responded with 1 / True" Else MsgBox "You have responded with 0 / False" End If
End Sub

Tags: inputbox

Categories: vba

Updated: March 29, 2019

Twitter Facebook LinkedIn

1 minute read

Here’s the simple steps to highlight the row and column of the selected cell which can be extremely useful when navigating large sets of data. Here’s a littl…

less than 1 minute read

How it Works Using SEARCH and ISNUMBER When you need to check if a cell contains specific text (or string) we need to combing the SEARCH and ISNUMBER functio…

less than 1 minute read

So you have a 0% value on one of your data labels and want to hide it?

1 minute read

Download the example workbook here: calculate-time-between-dates.xlsx

Leave a Comment