Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use Application.InputBox instead of just InputBox, and you'll get
a value of False returned if the user hits Cancel (or the Escape key). See the Excel Help on InputBox for the subtle distinction between these two. hth Andrew Taylor kckar wrote: i am trying to find out what to write so that when you hit the cancel button on the input box, nothing else happens. the cancel box will go away. here is my code Dim deleteline As Integer Dim count As Integer count = 1 deleteline = InputBox("Enter Item Line to Delete") Do While Range("f8").Offset(deleteline + count - 1) 0 Range("g8").Offset(deleteline + count - 1, 0) = Range("g8").Offset(deleteline + count, 0) Range("i8").Offset(deleteline + count - 1, 0) = Range("i8").Offset(deleteline + count, 0) count = count + 1 Loop Range("f8").Offset(deleteline + count - 1, 0) = "" Range("a1") = Range("a1") - 1 Range("f8").Offset(Range("a1") + 1, 0) = "" -- kckar ------------------------------------------------------------------------ kckar's Profile: http://www.excelforum.com/member.php...o&userid=25322 View this thread: http://www.excelforum.com/showthread...hreadid=533353 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cancel button to cancel the whole macro | Excel Programming | |||
InputBox - cancel button | Excel Programming | |||
Cancel button | Excel Programming | |||
Cancel Button | Excel Programming | |||
input box cancel button | Excel Programming |