Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 ![]() ![]() ![]() ![]() -- 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ![]() ![]() ![]() ![]() ![]() -- 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If Drat=vbNo Then NoCreateDrat 'Which is the name of the sub
That's all! Regards, Gijs. BTW What's a drat??? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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??? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Brain fart in simple subtraction | New Users to Excel | |||
Simple, Monday morning brain function | Excel Worksheet Functions | |||
Simple, Monday morning brain function | Excel Worksheet Functions | |||
My biggest excel brain racker yet...this one isn't simple | Excel Programming | |||
Very basic question... I MUST be having a brain fart.... | Excel Programming |