Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting 0 to not equal False
Hi, I have a macro that is supposed to prompt for some data. If the use hits cancel, I would like the macro to end. However, if the use inputs 0 (the default), I need the macro to continue running. Unfortunately, right now the macro is ending if you hit cancel, o input 0 and hit OK. Any suggestions would be much appreciated. Thanks. My code: Dim Depreciation Depreciation = Application.InputBox(prompt:="Depreciation?" Default:=Range("p5"), Type:=1) If Depreciation = False Then End Else Range("P5").Select ActiveCell.FormulaR1C1 = _ Depreciation End I -- mkerste ----------------------------------------------------------------------- mkerstei's Profile: http://www.excelforum.com/member.php...fo&userid=2568 View this thread: http://www.excelforum.com/showthread.php?threadid=55745 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
can I make cell "yes" equal 1, "no" equal 0 | Excel Discussion (Misc queries) | |||
Data displayed that is not equal to FALSE in a row | Excel Discussion (Misc queries) | |||
What's the best way to toggle between true and false in Excel? Hiall, My excel work involves a lot of toggling between true and false (booleantypes) ... and it's very repetitive... Is there a way to select a bunch ofcells, and press a key short-cu | Excel Discussion (Misc queries) | |||
lower and upper case equal on spreadsheet but not equal in VB | Excel Programming | |||
True Or False, no matter what... it still displays the false statement | Excel Programming |