PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

autoclick "ok" msgbox

 
 
jason
Guest
Posts: n/a
 
      13th Aug 2009
is this possible?
thanks!
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      13th Aug 2009
Are you writing code that displays a prompt?

Lots of those verification prompts can be avoided by:

application.displayalerts = false
'your code here
application.displayalerts = true

If this doesn't help, you may want to describe your situation in greater detail.

jason wrote:
>
> is this possible?
> thanks!


--

Dave Peterson
 
Reply With Quote
 
eliano
Guest
Posts: n/a
 
      13th Aug 2009
On 13 Ago, 22:37, jason <jason.mell...@gmail.com> wrote:
> is this possible?
> thanks!


Hi Jason.
I hope you understand what means the Dave's answer.:-))
However, try:

Public Sub Msgout()
Const iSec As Long = 3
Const msg As String = "This may be a no sense message; Ciao!"
Dim titolo As String
titolo = "Il messaggio si chiude dopo " & iSec & " secondi"
CreateObject("WScript.Shell").Popup msg, iSec, titolo
End Sub

Regards
Eliano
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      14th Aug 2009
Just to add to Eliano's response.

The suggested code actually uses a "self-dismissing" msgbox. It's not
dismissing a msgbox that excel shows (or the developer used).

And it seems to work in some versions of windows (no problems with winXP Home
and xl2003 for me). Not so well in other versions of windows.

eliano wrote:
>
> On 13 Ago, 22:37, jason <jason.mell...@gmail.com> wrote:
> > is this possible?
> > thanks!

>
> Hi Jason.
> I hope you understand what means the Dave's answer.:-))
> However, try:
>
> Public Sub Msgout()
> Const iSec As Long = 3
> Const msg As String = "This may be a no sense message; Ciao!"
> Dim titolo As String
> titolo = "Il messaggio si chiude dopo " & iSec & " secondi"
> CreateObject("WScript.Shell").Popup msg, iSec, titolo
> End Sub
>
> Regards
> Eliano


--

Dave Peterson
 
Reply With Quote
 
eliano
Guest
Posts: n/a
 
      14th Aug 2009
On 14 Ago, 01:43, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> Just to add to Eliano's response.
>
> The suggested code actually uses a "self-dismissing" msgbox. *It's not
> dismissing a msgbox that excel shows (or the developer used).
>
> And it seems to work in some versions of windows (no problems with winXP Home
> and xl2003 for me). *Not so well in other versions of windows.
>
>
>
>
>
> eliano wrote:
>
> > On 13 Ago, 22:37, jason <jason.mell...@gmail.com> wrote:
> > > is this possible?
> > > thanks!

>
> > Hi Jason.
> > I hope you understand what means the Dave's answer.:-))
> > However, try:

>
> > Public Sub Msgout()
> > * * Const iSec As Long = 3
> > * * Const msg As String = "This may be a no sense message; Ciao!"
> > * * Dim titolo As String
> > * * titolo = "Il messaggio si chiude dopo " & iSec & " secondi"
> > * * CreateObject("WScript.Shell").Popup msg, iSec, titolo
> > End Sub

>
> > Regards
> > Eliano

>
> --
>
> Dave Peterson- Nascondi testo citato
>
> - Mostra testo citato -


Hi Dave.
Many, many thanks for the news, I use XL2003.
However I specify: [message no sense] because the reason to insert a
msgbox in a macro, means that a reply from the user would be
considered necessary.
In accordance with your first answer, no action required, no message.
Sorry for my poor english and regards
Eliano
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      14th Aug 2009
Not all messages to users need to get a response from the user. I use the
statusbar to show stuff that the user may be interested in.

And lots of dialogs are redundant--I'm sure you've seen dialog boxes that allow
you to set an option to never see this dialog again.

But more importantly, not all code can be changed by the user. The original
poster may not be the author of the code.

eliano wrote:
<<snipped>>
>
> Hi Dave.
> Many, many thanks for the news, I use XL2003.
> However I specify: [message no sense] because the reason to insert a
> msgbox in a macro, means that a reply from the user would be
> considered necessary.
> In accordance with your first answer, no action required, no message.
> Sorry for my poor english and regards
> Eliano


--

Dave Peterson
 
Reply With Quote
 
jason
Guest
Posts: n/a
 
      14th Aug 2009
On Aug 13, 5:37*pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> Are you writing code that displays a prompt?
>
> Lots of those verification prompts can be avoided by:
>
> application.displayalerts = false
> 'your code here
> application.displayalerts = true
>
> If this doesn't help, you may want to describe your situation in greater detail.
>
> jason wrote:
>
> > is this possible?
> > thanks!

>
> --
>
> Dave Peterson


Hey Dave,

I get what you're saying. Basically, i am using vba to speak with some
proprietary data gathering software.
this data takes a little while to populate, and with this, i have
realized that a msgbox dialog looped with a strcomp (if match flag=0
else flag =1) that hits a flag (ie if flag=1 exit loop) and the match
occurs when data is still being gathered.

cells(1,1)=data gather reference
do while strcomp(cells(1,1),"Gathering Data...",vbtextcompare)=0
msgbox("Gathering data please wait...")
if strcomp(cells(1,1),"Gathering Data...",vbtextcompare)<>0
sendkeys "~"
end if
loop

basically, sendkeys isn't working. its more like a status msg. if i
can use a different kind of msg that is better, please let me know.
i just basically want the msgbox to come up and be a type of status
msg.


thanks!
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      14th Aug 2009
You could design your own userform and show it while the process is running.

But lots easier is to use:

application.statusbar = "Gathering Data..." & now
....do more stuff
application.statusbar = "Processing data..." & now
....do more stuff
application.statusbar = false 'give it back to excel

Make sure that the statusbar is visible and that the user knows where to look.

jason wrote:
>
> On Aug 13, 5:37 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > Are you writing code that displays a prompt?
> >
> > Lots of those verification prompts can be avoided by:
> >
> > application.displayalerts = false
> > 'your code here
> > application.displayalerts = true
> >
> > If this doesn't help, you may want to describe your situation in greater detail.
> >
> > jason wrote:
> >
> > > is this possible?
> > > thanks!

> >
> > --
> >
> > Dave Peterson

>
> Hey Dave,
>
> I get what you're saying. Basically, i am using vba to speak with some
> proprietary data gathering software.
> this data takes a little while to populate, and with this, i have
> realized that a msgbox dialog looped with a strcomp (if match flag=0
> else flag =1) that hits a flag (ie if flag=1 exit loop) and the match
> occurs when data is still being gathered.
>
> cells(1,1)=data gather reference
> do while strcomp(cells(1,1),"Gathering Data...",vbtextcompare)=0
> msgbox("Gathering data please wait...")
> if strcomp(cells(1,1),"Gathering Data...",vbtextcompare)<>0
> sendkeys "~"
> end if
> loop
>
> basically, sendkeys isn't working. its more like a status msg. if i
> can use a different kind of msg that is better, please let me know.
> i just basically want the msgbox to come up and be a type of status
> msg.
>
> thanks!


--

Dave Peterson
 
Reply With Quote
 
eliano
Guest
Posts: n/a
 
      14th Aug 2009
On 14 Ago, 14:14, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> Not all messages to users need to get a response from the user. *I use the
> statusbar to show stuff that the user may be interested in.
>
> And lots of dialogs are redundant--I'm sure you've seen dialog boxes thatallow
> you to set an option to never see this dialog again.
>
> But more importantly, not all code can be changed by the user. *The original
> poster may not be the author of the code. *
>
> eliano wrote:
>
> <<snipped>>
>
>
>
> > Hi Dave.
> > Many, many thanks for the news, I use XL2003.
> > However I specify: [message no sense] because the reason to insert a
> > msgbox in a macro, means that a reply from the user would be
> > considered necessary.
> > In accordance with your first answer, no action required, no message.
> > Sorry for my poor english and regards
> > Eliano

>
> --
>
> Dave Peterson


Hi Dave.
When I speak of "messagge" I refer to Msgbox, not to some necessary or
useful informations for the user,
The statusbar is a valid method, but the opinion of many users is that
the statusbar have a low visibility and in case of long elaborations I
use to send informations directly in a cell of the worksheet, but
never msgboxs.
Thanks again and regards
Eliano
 
Reply With Quote
 
jason
Guest
Posts: n/a
 
      17th Aug 2009
On Aug 14, 12:54*pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> You could design your own userform and show it while the process is running.
>
> But lots easier is to use:
>
> application.statusbar = "Gathering Data..." & now
> ...do more stuff
> application.statusbar = "Processing data..." & now
> ...do more stuff
> application.statusbar = false 'give it back to excel
>
> Make sure that the statusbar is visible and that the user knows where to look.
>
>
>
>
>
> jasonwrote:
>
> > On Aug 13, 5:37 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > > Are you writing code that displays a prompt?

>
> > > Lots of those verification prompts can be avoided by:

>
> > > application.displayalerts = false
> > > 'your code here
> > > application.displayalerts = true

>
> > > If this doesn't help, you may want to describe your situation in greater detail.

>
> > >jasonwrote:

>
> > > > is this possible?
> > > > thanks!

>
> > > --

>
> > > Dave Peterson

>
> > Hey Dave,

>
> > I get what you're saying. Basically, i am using vba to speak with some
> > proprietary data gathering software.
> > this data takes a little while to populate, and with this, i have
> > realized that a msgbox dialog looped with a strcomp (if match flag=0
> > else flag =1) that hits a flag (ie if flag=1 exit loop) and the match
> > occurs when data is still being gathered.

>
> > cells(1,1)=data gather reference
> > do while strcomp(cells(1,1),"Gathering Data...",vbtextcompare)=0
> > msgbox("Gathering data please wait...")
> > if strcomp(cells(1,1),"Gathering Data...",vbtextcompare)<>0
> > * *sendkeys "~"
> > end if
> > loop

>
> > basically, sendkeys isn't working. its more like a status msg. if i
> > can use a different kind of msg that is better, please let me know.
> > i just basically want the msgbox to come up and be a type of status
> > msg.

>
> > thanks!

>
> --
>
> Dave Peterson


hey dave,
i am using the msgbox functionality for a reason (it offers a tpye of
"break").
so with this, i just need what i asked, not a different solution.
thanks!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
MsgBox "Choose one ", vbYesNoCancel, " Three Options. " Steved Microsoft Excel Programming 3 11th Mar 2009 08:27 PM
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
msgbox "Can this message appear in boldface?",vbYesNo,"Hope So" Jesse Aufiero Microsoft Access Forms 1 2nd Oct 2006 04:50 PM
<FORM METHOD="post" onSubmit="return fieldcheck()" name="orientation" action="http://ws-kitty.BU.edu/AT/survey/orientation/script/write.asp" language="JavaScript"> Joeyej Microsoft ASP .NET 0 4th Jun 2004 08:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:33 AM.