Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Display MsbBox in Word using Excel VBA

Hi,
I would like to make a popup (msgbox) in word using Excel VBA.
Any idea ?
something like..
Set appWord = New Word.Application
appWord.MsbBox = "Report created"
Thanks!
Alex
--
Alex St-Pierre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Display MsbBox in Word using Excel VBA

You probably want the messagebox in the same Word instance which contains
the report, assuming that's why you're using Word.

Earlier in the routine you probably have one of these:

Set appWord = New Word.Application
Set appWord = CreateObject("Word.Application")
Set appWord = GetObject(, "Word.Application")

and then you create the report within appWord. Don't kill appWord until
after you've executed this line:

appWord.MsgBox "Report created", vbExclamation, "Message"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Alex St-Pierre" wrote in message
...
Hi,
I would like to make a popup (msgbox) in word using Excel VBA.
Any idea ?
something like..
Set appWord = New Word.Application
appWord.MsbBox = "Report created"
Thanks!
Alex
--
Alex St-Pierre



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Display MsbBox in Word using Excel VBA

Hi Jon,

When I try to write appWord.* , I don't have MsgBox choice and it doesn't
work if I write it ? appWord.Application.MsgBox doesn't work too. I seems
that msgbox is in class interaction. Do you have an other idea?
Thanks!
Alex
Set appWord = New Word.Application
appWord.Visible = True
Set MyDocWord = appWord.Documents.Add
--
Alex St-Pierre


"Jon Peltier" wrote:

You probably want the messagebox in the same Word instance which contains
the report, assuming that's why you're using Word.

Earlier in the routine you probably have one of these:

Set appWord = New Word.Application
Set appWord = CreateObject("Word.Application")
Set appWord = GetObject(, "Word.Application")

and then you create the report within appWord. Don't kill appWord until
after you've executed this line:

appWord.MsgBox "Report created", vbExclamation, "Message"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Alex St-Pierre" wrote in message
...
Hi,
I would like to make a popup (msgbox) in word using Excel VBA.
Any idea ?
something like..
Set appWord = New Word.Application
appWord.MsbBox = "Report created"
Thanks!
Alex
--
Alex St-Pierre




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Display MsbBox in Word using Excel VBA

You could either follow up on Dave's suggestions, or just use

MsgBox "Report created", vbExclamation, "Message"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Alex St-Pierre" wrote in message
...
Hi Jon,

When I try to write appWord.* , I don't have MsgBox choice and it doesn't
work if I write it ? appWord.Application.MsgBox doesn't work too. I seems
that msgbox is in class interaction. Do you have an other idea?
Thanks!
Alex
Set appWord = New Word.Application
appWord.Visible = True
Set MyDocWord = appWord.Documents.Add
--
Alex St-Pierre


"Jon Peltier" wrote:

You probably want the messagebox in the same Word instance which contains
the report, assuming that's why you're using Word.

Earlier in the routine you probably have one of these:

Set appWord = New Word.Application
Set appWord = CreateObject("Word.Application")
Set appWord = GetObject(, "Word.Application")

and then you create the report within appWord. Don't kill appWord until
after you've executed this line:

appWord.MsgBox "Report created", vbExclamation, "Message"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Alex St-Pierre" wrote in
message
...
Hi,
I would like to make a popup (msgbox) in word using Excel VBA.
Any idea ?
something like..
Set appWord = New Word.Application
appWord.MsbBox = "Report created"
Thanks!
Alex
--
Alex St-Pierre






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Display MsbBox in Word using Excel VBA

Thanks!!

Dave's suggesion is working good. Word 2002 recognize
appWord.WordBasic.MsgBox "Hi!"


--
Alex St-Pierre


"Jon Peltier" wrote:

You could either follow up on Dave's suggestions, or just use

MsgBox "Report created", vbExclamation, "Message"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Alex St-Pierre" wrote in message
...
Hi Jon,

When I try to write appWord.* , I don't have MsgBox choice and it doesn't
work if I write it ? appWord.Application.MsgBox doesn't work too. I seems
that msgbox is in class interaction. Do you have an other idea?
Thanks!
Alex
Set appWord = New Word.Application
appWord.Visible = True
Set MyDocWord = appWord.Documents.Add
--
Alex St-Pierre


"Jon Peltier" wrote:

You probably want the messagebox in the same Word instance which contains
the report, assuming that's why you're using Word.

Earlier in the routine you probably have one of these:

Set appWord = New Word.Application
Set appWord = CreateObject("Word.Application")
Set appWord = GetObject(, "Word.Application")

and then you create the report within appWord. Don't kill appWord until
after you've executed this line:

appWord.MsgBox "Report created", vbExclamation, "Message"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Alex St-Pierre" wrote in
message
...
Hi,
I would like to make a popup (msgbox) in word using Excel VBA.
Any idea ?
something like..
Set appWord = New Word.Application
appWord.MsbBox = "Report created"
Thanks!
Alex
--
Alex St-Pierre








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Display MsbBox in Word using Excel VBA

I searched the excel newsgroups for "msgbox word" and found this hit from
Orlando Magalhães Filho.

http://groups.google.co.uk/group/mic...3dbe5d951282a6

or

http://snipurl.com/1dfpi

========

Sub MsgBoxOverWord()
Dim WordApp As Object
Set WordApp = CreateObject("word.application")
With WordApp
.Visible = True
.Documents.Add
WordApp.WordBasic.MsgBox "Hi!", 1
.Quit
End With
End Sub

Harald Staff added a link to show how to use an API call to put the message box
atop any application.



Alex St-Pierre wrote:

Hi,
I would like to make a popup (msgbox) in word using Excel VBA.
Any idea ?
something like..
Set appWord = New Word.Application
appWord.MsbBox = "Report created"
Thanks!
Alex
--
Alex St-Pierre


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Display MsbBox in Word using Excel VBA

ps. That worked for me in xl2003.

Alex St-Pierre wrote:

Hi,
I would like to make a popup (msgbox) in word using Excel VBA.
Any idea ?
something like..
Set appWord = New Word.Application
appWord.MsbBox = "Report created"
Thanks!
Alex
--
Alex St-Pierre


--

Dave Peterson
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
Display symbols in embedded excel sheet in word df_newtovba[_2_] Excel Discussion (Misc queries) 0 December 23rd 08 08:49 PM
display list or word Mossykel Excel Discussion (Misc queries) 2 September 9th 08 09:23 PM
date display from excel in word [sven] Excel Programming 2 February 11th 07 04:16 PM
Display Word Paragraphs in Excel??? quartz[_2_] Excel Programming 2 January 10th 05 07:39 PM
msbbox lawson Excel Programming 1 May 10th 04 06:10 PM


All times are GMT +1. The time now is 11:31 AM.

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"