Input box with checkmarks

ThatGuyNamedDean

New Member
Joined
Apr 16, 2015
Messages
9
I am trying to create an input box that has an either/or type check box along with the standard input box. The user has to input a temperature and I would like to give them the opportunity to input in degC or degF and have the program make any of the necessary calculations before the number is used as part of a graph. I'm not sure if this function is even possible so any help or recommendations would be greatly appreciated. Thanks!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I am trying to create an input box that has an either/or type check box along with the standard input box. The user has to input a temperature and I would like to give them the opportunity to input in degC or degF and have the program make any of the necessary calculations before the number is used as part of a graph. I'm not sure if this function is even possible so any help or recommendations would be greatly appreciated. Thanks!
If you want check boxes that requires a UserForm. Here's a way you can offer the user a choice and still use an InputBox function. Comment out the message boxes which are there to show you what the Val function returns.
Code:
Sub CorF()
Dim ans As Variant
ans = InputBox("Input temperature followed by F or C as 98.6F")
If ans = "" Then Exit Sub  'user clicked Cancel
If ans Like "*F" Then
    ans = Val(ans)
    MsgBox ans
    'do calculations for Farenheit
ElseIf ans Like "*C" Then
    ans = Val(ans)
    MsgBox ans
    'do calculations for Centigrade
End If
End Sub
 
Upvote 0
Thank you Joe and Mike. I have implemented the input box technique right now and as I start to become more familiar with userforms this will be the 2.0 version of the workbook. Thanks!
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top