Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I consider myself an Excel formula expert, but only slightly above th novice level in VBA macros. Here's my problem. I have a workbook where I've written about 30 different retrieve macro (Hyperion Essbase) to update data in different sections of the file. At the end of each macro I have a msgbox that basicall says "dat updated". This is fine for running the macros individually. I'm now writing a macro that will call and run all of the other ones i a specific order. I don't want the user to have to click OK 30 time in order for the macro to continue. Is there a way to make it automatically clear each box and continue. Obviously I could take the msgboxs off of the end of each individua macro and it would work, but I'd really like to keep them their. Any suggestions? Thanks:confused ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
It think you'll have to pass a parameter to every macro that tells the macro what to do. You could make the parameter Optional, i.e. Public Sub MySub(Optional ShowMsg as boolean = True) 'In this case ShowMsg = True if no parameter was given 'Your code... If ShowMsg Then msgbox "Updated!" End If End Sub Hope this help! /Nicke -----Original Message----- Hi, I consider myself an Excel formula expert, but only slightly above the novice level in VBA macros. Here's my problem. I have a workbook where I've written about 30 different retrieve macros (Hyperion Essbase) to update data in different sections of the file. At the end of each macro I have a msgbox that basicall says "data updated". This is fine for running the macros individually. I'm now writing a macro that will call and run all of the other ones in a specific order. I don't want the user to have to click OK 30 times in order for the macro to continue. Is there a way to make it automatically clear each box and continue. Obviously I could take the msgboxs off of the end of each individual macro and it would work, but I'd really like to keep them their. Any suggestions? Thanks ![]() ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Nicke" wrote in message ...
Hi, It think you'll have to pass a parameter to every macro that tells the macro what to do. You could make the parameter Optional, i.e. Public Sub MySub(Optional ShowMsg as boolean = True) 'In this case ShowMsg = True if no parameter was given 'Your code... If ShowMsg Then msgbox "Updated!" End If End Sub Hope this help! /Nicke -----Original Message----- Hi, I consider myself an Excel formula expert, but only slightly above the novice level in VBA macros. Here's my problem. I have a workbook where I've written about 30 different retrieve macros (Hyperion Essbase) to update data in different sections of the file. At the end of each macro I have a msgbox that basicall says "data updated". This is fine for running the macros individually. I'm now writing a macro that will call and run all of the other ones in a specific order. I don't want the user to have to click OK 30 times in order for the macro to continue. Is there a way to make it automatically clear each box and continue. Obviously I could take the msgboxs off of the end of each individual macro and it would work, but I'd really like to keep them their. Any suggestions? Thanks ![]() ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ Nicke, I don't understand. (Remember that I'm a novice). Should I enter the code: Public Sub MySub(Optional ShowMsg as boolean = True) within the text of my call macro, or within each of the individual macros. Same question for the : If ShowMsg Then msgbox "Updated!" End If thanks . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
At the top of your module put in
Public bNotOK As Boolean ' run if you want to show msgboxes and they ' are not showing Sub bNotOkFalse() bNotOK = False End Sub Sub Process30() bNotOK = True Macro1 Macro2 ' . . . ' macro30 bNotOK = False End Sub Sub Macro1() ' code If Not bNotOK Then MsgBox "Done with Macro1" End If End Sub Sub Macro2() ' If Not bNotOK Then MsgBox "Done with Macro2" End If End Sub -- Regards, Tom Ogilvy Richard Banks wrote in message m... "Nicke" wrote in message ... Hi, It think you'll have to pass a parameter to every macro that tells the macro what to do. You could make the parameter Optional, i.e. Public Sub MySub(Optional ShowMsg as boolean = True) 'In this case ShowMsg = True if no parameter was given 'Your code... If ShowMsg Then msgbox "Updated!" End If End Sub Hope this help! /Nicke -----Original Message----- Hi, I consider myself an Excel formula expert, but only slightly above the novice level in VBA macros. Here's my problem. I have a workbook where I've written about 30 different retrieve macros (Hyperion Essbase) to update data in different sections of the file. At the end of each macro I have a msgbox that basicall says "data updated". This is fine for running the macros individually. I'm now writing a macro that will call and run all of the other ones in a specific order. I don't want the user to have to click OK 30 times in order for the macro to continue. Is there a way to make it automatically clear each box and continue. Obviously I could take the msgboxs off of the end of each individual macro and it would work, but I'd really like to keep them their. Any suggestions? Thanks ![]() ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ Nicke, I don't understand. (Remember that I'm a novice). Should I enter the code: Public Sub MySub(Optional ShowMsg as boolean = True) within the text of my call macro, or within each of the individual macros. Same question for the : If ShowMsg Then msgbox "Updated!" End If thanks . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Tom, I works like a charm ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
msgbox | Excel Discussion (Misc queries) | |||
MsgBox | Excel Discussion (Misc queries) | |||
msgbox | Excel Discussion (Misc queries) | |||
Msgbox | Excel Programming | |||
MsgBox | Excel Programming |