View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default message box transient -sub by Chip Perason

You could also use late binding and drop the reference:

Dim SH As Object
Dim Res As Long
Set SH = CreateObject("wscript.shell")
Res = SH.Popup(Text:="Click Me", secondstowait:=5, _
Title:="Hello, World", Type:=vbOKOnly)



"R.VENKATARAMAN" wrote:

In one of my serches in googles group I found pearson's sub on having a
transient message box

quote
Dim SH As IWshRuntimeLibrary.WshShell
Dim Res As Long
Set SH = New IWshRuntimeLibrary.WshShell
Res = SH.Popup(Text:="Click Me", secondstowait:=5, _
Title:="Hello, World", Type:=vbOKOnly)
unquote

as suggested i have referenced in vbeditor tools references

<windows scripting host object model(ver 1.0)

and then run the above sub
But I get an error message and the sub stops at the line

<Dim SH As IWshRuntimeLibrary.WshShell

the error mesage is
<user defined type not defind

where I am doing the mistake

mine excel 2000
windows 98SE

request help
thanks regards.


--

Dave Peterson