Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
How to disable the message prompt when running a Run macro ? Below is the example of VBA code for a)Run macro Sub Run() Application.Run "BOT.bankrecon.XLS!Module14.BOT" End Sub b)BOT macro Sub BOT() Dim Macro1 As String Range("A12").Select If Range("A12") = "Done" Then Macro1 = x x = False Else MsgBox "Please click Once", vbInformation, "Msg Box vbInformation" Range("A12").Select Range("A12") = "Done" End If End Sub Please help Thanks Regards Lenard |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is the message prompt?
I would suggest you don't name your macro Run since that the name of a built in procedure - which you are well aware of. -- Regards, Tom Ogilvy "ltong" wrote in message om... Hi, How to disable the message prompt when running a Run macro ? Below is the example of VBA code for a)Run macro Sub Run() Application.Run "BOT.bankrecon.XLS!Module14.BOT" End Sub b)BOT macro Sub BOT() Dim Macro1 As String Range("A12").Select If Range("A12") = "Done" Then Macro1 = x x = False Else MsgBox "Please click Once", vbInformation, "Msg Box vbInformation" Range("A12").Select Range("A12") = "Done" End If End Sub Please help Thanks Regards Lenard |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
Thanks for your prompt reply. Actually, I've few macros which has to be run sequentially from one to another ( e.g. Button 1, 2, 3 until 15) in order to execute the required process. Thus, these macros are being attached with the message prompt " Please click once, OK ". The purpose of this procedure is to inform user that this process is allowed to execute once and thereafter, it will be disable, otherwise the process would be incorrect. Since I'd already built in the procedure of message prompt in all macros at the earlier days and it will take time for me to delete them, thus just leave them. Now, if I were to use Run macro which will be run individually and sequentially from one to another and at the same time, the message prompt" Please click once, OK" is being disabled, otherwise it will be irritating to click the message prompt each time the macro is being run by Run macro. Therefore, Could I have the solution on how to disable the message prompt " Please click once, OK" while running the Run macro. On the other hand, if the Run macro is not used and I were to run few macros which has to be run individually and sequentially from one to another, thereafter it will disable in order to execute the required process. Please advice the correct and effective excel VBA on this problem as well. Thanks Regards Lenard "Tom Ogilvy" wrote in message ... What is the message prompt? I would suggest you don't name your macro Run since that the name of a built in procedure - which you are well aware of. -- Regards, Tom Ogilvy "ltong" wrote in message om... Hi, How to disable the message prompt when running a Run macro ? Below is the example of VBA code for a)Run macro Sub Run() Application.Run "BOT.bankrecon.XLS!Module14.BOT" End Sub b)BOT macro Sub BOT() Dim Macro1 As String Range("A12").Select If Range("A12") = "Done" Then Macro1 = x x = False Else MsgBox "Please click Once", vbInformation, "Msg Box vbInformation" Range("A12").Select Range("A12") = "Done" End If End Sub Please help Thanks Regards Lenard |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There is no code to suppress the message box if you code has the command to
show it. You could design your code so you could set a variable value. Then modify the code to show the msgbox to check that value to decide whether to show the box or not. (if I understand correctly that sometimes you might want to show it and other times not). -- Regards, Tom Ogilvy "ltong" wrote in message om... Hi Tom, Thanks for your prompt reply. Actually, I've few macros which has to be run sequentially from one to another ( e.g. Button 1, 2, 3 until 15) in order to execute the required process. Thus, these macros are being attached with the message prompt " Please click once, OK ". The purpose of this procedure is to inform user that this process is allowed to execute once and thereafter, it will be disable, otherwise the process would be incorrect. Since I'd already built in the procedure of message prompt in all macros at the earlier days and it will take time for me to delete them, thus just leave them. Now, if I were to use Run macro which will be run individually and sequentially from one to another and at the same time, the message prompt" Please click once, OK" is being disabled, otherwise it will be irritating to click the message prompt each time the macro is being run by Run macro. Therefore, Could I have the solution on how to disable the message prompt " Please click once, OK" while running the Run macro. On the other hand, if the Run macro is not used and I were to run few macros which has to be run individually and sequentially from one to another, thereafter it will disable in order to execute the required process. Please advice the correct and effective excel VBA on this problem as well. Thanks Regards Lenard "Tom Ogilvy" wrote in message ... What is the message prompt? I would suggest you don't name your macro Run since that the name of a built in procedure - which you are well aware of. -- Regards, Tom Ogilvy "ltong" wrote in message om... Hi, How to disable the message prompt when running a Run macro ? Below is the example of VBA code for a)Run macro Sub Run() Application.Run "BOT.bankrecon.XLS!Module14.BOT" End Sub b)BOT macro Sub BOT() Dim Macro1 As String Range("A12").Select If Range("A12") = "Done" Then Macro1 = x x = False Else MsgBox "Please click Once", vbInformation, "Msg Box vbInformation" Range("A12").Select Range("A12") = "Done" End If End Sub Please help Thanks Regards Lenard |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
Thanks for your suggestion. How about the question mentioned in my last message ? "if the Run macro is not used and I were to run few macros which has to be run individually and sequentially from one to another (e.g. Macro1,2,3 to 10 ), thereafter it will disable in order to execute the required process, otherwise it will generate incorrect result. Please advice the correct and effective excel VBA on this problem as well. " Sorry, I still learning excel VBA and please help, thanks Regards Lenard "Tom Ogilvy" wrote in message ... There is no code to suppress the message box if you code has the command to show it. You could design your code so you could set a variable value. Then modify the code to show the msgbox to check that value to decide whether to show the box or not. (if I understand correctly that sometimes you might want to show it and other times not). -- Regards, Tom Ogilvy "ltong" wrote in message om... Hi Tom, Thanks for your prompt reply. Actually, I've few macros which has to be run sequentially from one to another ( e.g. Button 1, 2, 3 until 15) in order to execute the required process. Thus, these macros are being attached with the message prompt " Please click once, OK ". The purpose of this procedure is to inform user that this process is allowed to execute once and thereafter, it will be disable, otherwise the process would be incorrect. Since I'd already built in the procedure of message prompt in all macros at the earlier days and it will take time for me to delete them, thus just leave them. Now, if I were to use Run macro which will be run individually and sequentially from one to another and at the same time, the message prompt" Please click once, OK" is being disabled, otherwise it will be irritating to click the message prompt each time the macro is being run by Run macro. Therefore, Could I have the solution on how to disable the message prompt " Please click once, OK" while running the Run macro. On the other hand, if the Run macro is not used and I were to run few macros which has to be run individually and sequentially from one to another, thereafter it will disable in order to execute the required process. Please advice the correct and effective excel VBA on this problem as well. Thanks Regards Lenard "Tom Ogilvy" wrote in message ... What is the message prompt? I would suggest you don't name your macro Run since that the name of a built in procedure - which you are well aware of. -- Regards, Tom Ogilvy "ltong" wrote in message om... Hi, How to disable the message prompt when running a Run macro ? Below is the example of VBA code for a)Run macro Sub Run() Application.Run "BOT.bankrecon.XLS!Module14.BOT" End Sub b)BOT macro Sub BOT() Dim Macro1 As String Range("A12").Select If Range("A12") = "Done" Then Macro1 = x x = False Else MsgBox "Please click Once", vbInformation, "Msg Box vbInformation" Range("A12").Select Range("A12") = "Done" End If End Sub Please help Thanks Regards Lenard |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Public bSuppress as Boolean
Sub RunAll() bSuppress = True Macro1 Macro2 Macro3 bSuppress = False End Sub Sub Macro1() if not bSuppress then msgbox "Only run once" end if end Sub Sub Macro2() If not bSuppress then msgbox "Only run once" end if End Sub Sub Macro3() If not bSuppress then msgbox "Only run once" End if End Sub -- Regards, Tom Ogilvy "ltong" wrote in message om... Hi Tom, Thanks for your suggestion. How about the question mentioned in my last message ? "if the Run macro is not used and I were to run few macros which has to be run individually and sequentially from one to another (e.g. Macro1,2,3 to 10 ), thereafter it will disable in order to execute the required process, otherwise it will generate incorrect result. Please advice the correct and effective excel VBA on this problem as well. " Sorry, I still learning excel VBA and please help, thanks Regards Lenard "Tom Ogilvy" wrote in message ... There is no code to suppress the message box if you code has the command to show it. You could design your code so you could set a variable value. Then modify the code to show the msgbox to check that value to decide whether to show the box or not. (if I understand correctly that sometimes you might want to show it and other times not). -- Regards, Tom Ogilvy "ltong" wrote in message om... Hi Tom, Thanks for your prompt reply. Actually, I've few macros which has to be run sequentially from one to another ( e.g. Button 1, 2, 3 until 15) in order to execute the required process. Thus, these macros are being attached with the message prompt " Please click once, OK ". The purpose of this procedure is to inform user that this process is allowed to execute once and thereafter, it will be disable, otherwise the process would be incorrect. Since I'd already built in the procedure of message prompt in all macros at the earlier days and it will take time for me to delete them, thus just leave them. Now, if I were to use Run macro which will be run individually and sequentially from one to another and at the same time, the message prompt" Please click once, OK" is being disabled, otherwise it will be irritating to click the message prompt each time the macro is being run by Run macro. Therefore, Could I have the solution on how to disable the message prompt " Please click once, OK" while running the Run macro. On the other hand, if the Run macro is not used and I were to run few macros which has to be run individually and sequentially from one to another, thereafter it will disable in order to execute the required process. Please advice the correct and effective excel VBA on this problem as well. Thanks Regards Lenard "Tom Ogilvy" wrote in message ... What is the message prompt? I would suggest you don't name your macro Run since that the name of a built in procedure - which you are well aware of. -- Regards, Tom Ogilvy "ltong" wrote in message om... Hi, How to disable the message prompt when running a Run macro ? Below is the example of VBA code for a)Run macro Sub Run() Application.Run "BOT.bankrecon.XLS!Module14.BOT" End Sub b)BOT macro Sub BOT() Dim Macro1 As String Range("A12").Select If Range("A12") = "Done" Then Macro1 = x x = False Else MsgBox "Please click Once", vbInformation, "Msg Box vbInformation" Range("A12").Select Range("A12") = "Done" End If End Sub Please help Thanks Regards Lenard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable Allow ActiveX prompt | Excel Discussion (Misc queries) | |||
disable query refresh prompt? | Excel Discussion (Misc queries) | |||
How do I disable the ActiveX Control prompt? | Excel Discussion (Misc queries) | |||
Disable Excel Prompt | Excel Programming | |||
Prompt to enable/disable macros | Excel Programming |