Please help with macro options

Savuti

Board Regular
Joined
Apr 30, 2008
Messages
156
Hello all, this is the base code I have so far, it is not correct - I need the main macro to run if the value in "E14" is = 0.
If the value is 1 - the message should say "Denied" and ExitSub End If
If the value is 2 - the message should say "Okay" and Exit Sub End If

Thanks for your help



Code:
If Range("E14").Value = 0 Then
    Else
    MsgBox "Okay"
        Exit Sub
  End If
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hello,

<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> Ateam()<br><br>    <SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> Range("E14").Value<br>        <SPAN style="color:#00007F">Case</SPAN> 0<br>            <SPAN style="color:#007F00">'''Do stuff here</SPAN><br>        <SPAN style="color:#00007F">Case</SPAN> 1<br>            MsgBox "Denied"<br>        <SPAN style="color:#00007F">Case</SPAN> 2<br>            MsgBox "Okay"<br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Select</SPAN><br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

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