Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MsgBox Help!


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default MsgBox Help!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default MsgBox Help!

"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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default MsgBox Help!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MsgBox Help!


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
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
msgbox peyman Excel Discussion (Misc queries) 5 October 4th 07 09:56 PM
MsgBox CC Excel Discussion (Misc queries) 4 May 5th 06 05:45 PM
msgbox James Coughlan Excel Discussion (Misc queries) 3 May 3rd 06 01:57 PM
Msgbox Bernd[_2_] Excel Programming 0 October 24th 03 10:20 AM
MsgBox Phil Perry Excel Programming 1 July 9th 03 07:38 PM


All times are GMT +1. The time now is 10:41 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"