ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A No Brain Question......This must be obviously Simple (https://www.excelbanter.com/excel-programming/315319-no-brain-question-must-obviously-simple.html)

Celtic_Avenger[_56_]

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

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

--
Celtic_Avenge
-----------------------------------------------------------------------
Celtic_Avenger's Profile: http://www.excelforum.com/member.php...fo&userid=1410
View this thread: http://www.excelforum.com/showthread.php?threadid=27397


JulieD

A No Brain Question......This must be obviously Simple
 
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

"Celtic_Avenger" wrote in
message ...

I'm running a simple code to save specific sheets in a spreadsheet to
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 This
Time?", vbYesNo, "DAILY DRAT")
If Drat = vbNo Then End

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

But how to I alter the above code to run the following Sub, called
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:


--
Celtic_Avenger
------------------------------------------------------------------------
Celtic_Avenger's Profile:
http://www.excelforum.com/member.php...o&userid=14101
View this thread: http://www.excelforum.com/showthread...hreadid=273976




ManualMan

A No Brain Question......This must be obviously Simple
 
If Drat=vbNo Then NoCreateDrat 'Which is the name of the sub
That's all!

Regards,


Gijs.
BTW What's a drat???


Tom Ogilvy

A No Brain Question......This must be obviously Simple
 
In the code shown, after mainmenu1 was dropped, this would create the Drat
since you haven't terminated that code.

--
Regards,
Tom Ogilvy

"ManualMan" wrote in message
ps.com...
If Drat=vbNo Then NoCreateDrat 'Which is the name of the sub
That's all!

Regards,


Gijs.
BTW What's a drat???




ManualMan

A No Brain Question......This must be obviously Simple
 
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



All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com