Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Disable Message Prompt in VBA

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Disable Message Prompt in VBA

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Disable Message Prompt in VBA

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Disable Message Prompt in VBA

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Disable Message Prompt in VBA

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Disable Message Prompt in VBA

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable Allow ActiveX prompt Gary Excel Discussion (Misc queries) 0 May 31st 06 05:45 PM
disable query refresh prompt? GoBobbyGo Excel Discussion (Misc queries) 0 April 7th 06 06:42 PM
How do I disable the ActiveX Control prompt? Keith Excel Discussion (Misc queries) 0 May 18th 05 09:58 AM
Disable Excel Prompt Seth[_3_] Excel Programming 3 November 5th 03 02:07 AM
Prompt to enable/disable macros John[_59_] Excel Programming 4 September 27th 03 10:16 PM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"