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

Hi, I am trying to build a macro for a histogram. When the macro is complete,
I am asked "Histogram - Some data will be hidden by embedded chart(s)." I
can click OK or cancel. How can I build my OK response into the macro so
that I do not need to manually respond? Thank you for reviewing my question.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default Macro Message Box

Remove the MsgBox from the macro if it is unnecessary.

--

HTH

Bob

"lahuwm" wrote in message
...
Hi, I am trying to build a macro for a histogram. When the macro is
complete,
I am asked "Histogram - Some data will be hidden by embedded chart(s)." I
can click OK or cancel. How can I build my OK response into the macro so
that I do not need to manually respond? Thank you for reviewing my
question.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Macro Message Box

Hi,

AFAIK message boxes are modal so you can't do that but you can do it with a
userform. Create a userform and put a text box on it and include this line in
you code at the appropriate point. Note the declaration of Mytext as Public

Public MyText As String
Sub YourSub()
'Your Code
MyText = "An informative message"
UserForm1.Show
End Sub

Attach this code to the userform and it will display your message and close
after 10 seconds.

Private Sub UserForm_Activate()
TextBox1.Text = MyText
Application.Wait (Now + TimeValue("0:00:10"))
Unload UserForm1
End Sub



--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"lahuwm" wrote:

Hi, I am trying to build a macro for a histogram. When the macro is complete,
I am asked "Histogram - Some data will be hidden by embedded chart(s)." I
can click OK or cancel. How can I build my OK response into the macro so
that I do not need to manually respond? Thank you for reviewing my question.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Macro Message Box

If that message is system generated, then you canadd the following to your
code to eliminate the message:

Application.DisplayAlerts = False ' Turns off system generated messages

....your code here...

Application.DisplayAlerts = True ' Turns system generated messages back on

HTH,

Eric

"lahuwm" wrote:

Hi, I am trying to build a macro for a histogram. When the macro is complete,
I am asked "Histogram - Some data will be hidden by embedded chart(s)." I
can click OK or cancel. How can I build my OK response into the macro so
that I do not need to manually respond? Thank you for reviewing my question.

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
Enable macro message on VBA Workbook Open then macro ends Barb Reinhardt Excel Programming 2 July 15th 08 03:59 PM
A macro disabled message comes up but there is no macro. lovetocount Excel Discussion (Misc queries) 2 June 25th 08 12:54 PM
Macro Pop-Up Message Millie Excel Discussion (Misc queries) 1 July 31st 07 09:52 PM
Macro message Lesley Charts and Charting in Excel 0 February 27th 07 12:54 PM
Macro message box ynissel Excel Discussion (Misc queries) 7 July 18th 05 06:50 PM


All times are GMT +1. The time now is 10:17 AM.

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

About Us

"It's about Microsoft Excel"