A No Brain Question......This must be obviously Simple

C

Celtic_Avenger

I'm running a simple code to save specific sheets in a spreadsheet t
new workbook.

This is activated by a yes no message box.

ie. "Are you sure you want to do this at this time?
------"Yes"....."No"

In the code I have I have the following..........

Drat = MsgBox("Are You Sure You Wish To Create Your Daily Drat At Thi
Time?", vbYesNo, "DAILY DRAT")
If Drat = vbNo Then End

There is then the required code below this to make the program copy an
save the required sheets.

But how to I alter the above code to run the following Sub, calle
NoCreateDrat.

Sub NoCreateDrat()
MASFORM.Hide
MainMenu1.Show
End Sub

Or can I just add the instructions into the first code.

This must be simple......I just cant figure it out..........

Thanks


Celtic_Avenger
:confused: :confused: :confused: :confused: :confused
 
J

JulieD

Hi

try
Drat = MsgBox("Are You Sure You Wish To Create Your Daily Drat At This
Time?", vbYesNo, "DAILY DRAT")
If Drat = vbNo Then
Call NoCreateDrat
Exit Sub
End if
'then the rest of the original code

Regards
JulieD
 
M

ManualMan

If Drat=vbNo Then NoCreateDrat 'Which is the name of the sub
That's all!

Regards,


Gijs.
BTW What's a drat???
 
T

Tom Ogilvy

In the code shown, after mainmenu1 was dropped, this would create the Drat
since you haven't terminated that code.
 
M

ManualMan

Yeah,

noticed that too! Decided it wasn't part of the primary question, so I
did not mention it. Tom, you always are so accurate! Glad you are
around. (For those who consider this a sarcastic remark: I really think
Tom rules!)

ManualMan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top