Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default autoclick "ok" msgbox

is this possible?
thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default autoclick "ok" msgbox

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default autoclick "ok" msgbox

On 13 Ago, 22:37, jason 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default autoclick "ok" msgbox

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 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default autoclick "ok" msgbox

On 14 Ago, 01:43, Dave Peterson 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 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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default autoclick "ok" msgbox

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
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default autoclick "ok" msgbox

On Aug 13, 5:37*pm, Dave Peterson 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!
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default autoclick "ok" msgbox

On 14 Ago, 14:14, Dave Peterson 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 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


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
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default autoclick "ok" msgbox

On Aug 14, 12:54*pm, Dave Peterson 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 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!
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default autoclick "ok" msgbox

Good luck.

jason wrote:

On Aug 14, 12:54 pm, Dave Peterson 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 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!


--

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
MsgBox "Choose one ", vbYesNoCancel, " Three Options. " Steved Excel Programming 3 March 11th 09 08:27 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 06:07 PM.

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"