cancel inputbox macro

  1. K

    Application.InputBox - "Cancel" button

    I am having trouble coding a macro in the case where the response to an InputBox request is the "Cancel" button. As I understand it, the cancel button returns the value "False". The following code results in "Type Mismatch" error 13 at the "If Q = False" line. Q has been defined as a variant. In...
  2. L

    application.inputbox 0-value VS CANCEL

    Hi all, I'm using the application.inputbox function to get a value from the user (as currency). If the user clicks cancel, the procedure should end. But it should be possible for the user to input the numerical value 0 and then click OK. How can I know if a 0 was entered or if cancel was...
  3. E

    Exit Sub when Cancel is Pressed

    Hi, I have the below macro set up to filter 7 tabs by a user defined entry, choose a printer and then print those tabs, before removing all the filters and going back to the original screen. Works fine, except for when the user hits cancel on the first input box. If cancel is pressed then the...

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