inputbox cancel

  1. K

    InputBox - Pressing Cancel doesn't exit sub

    I may be naive, but I expected that the default setting for pressing "Cancel" on a message box would be to exit sub. That's not the case! ? Nothing happens and it just continues on. Is there some code I need to add to get the program to end sub when "Cancel" is pressed? Here's one of the...
  2. I

    Loop the same procedure until user interference

    Hello Experts, I new in VBA, I need your help. How do I loop the procedure/macro until I cancel the InputBox or remain empty value InputBox?? Sub FundData() Dim TikerName As String TikerName = Application.InputBox(Prompt:="Please enter Share Code", Type:=2) With...
  3. B

    On Error Quit Macro - Otherwise keep going

    Hi - pretty simple what I am trying to do I have a feeling.....I have an input box in my macro and if the user clicks "Cancel" I want the macro to skip to the End Sub line otherwise execute all the code between the input box line and the End Sub line.
  4. C

    an old problem

    excel 2007; W7 I'm using an input box to ask for a $value. my code is: <code> tryagain: ans = InputBox("How much is owed right now?", vbOKCancel) If vbCancel = True Then Exit Sub End If If ans <> "" Then End If If ans = "" Then...
  5. A

    Inputbox on cancel delete initial action that prompted

    See code below Private Sub Worksheet_Change(ByVal TARGET As Range) Dim sReason As String If TARGET.Cells.Count > 1 Then Exit Sub Application.ScreenUpdating = False If Not Intersect(TARGET, Range("A1:A500")) Is Nothing Then If TARGET.Value =...
  6. myactiondesign

    User Exit Through Cancel or Close in FOR/DO LOOP

    Hi all, I've got a fully functioning macro that cycles through a range of cells and inserts user input sales data into each cell, one-by-one. The problem is that you cannot cancel or exit. Sub FirstSalesInput() 'This sub will create six messages boxes for user input 'The user input will be...
  7. L

    Input Box not working properly

    I want activate an input box (using VBOkCancel) if there is a zero or null value in a cell. If per chance the user does not enter a number using the input box I want the the sub to select the cell and then exit the sub. My problem is that the input box is not coming up empty. It has the value...
  8. B

    input box if cancel.. exit sub

    I have this code below, it works well with the exception if "cancel" is clicked on the input box. It is selecting all of the shapes on the page and changes the color of them from yellow to brown. So basically it is running the rest of the code after cancel is clicked. Thanks What I would...

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