#### Clear the message queue

Hi,
I create a dialog-based application. I capture video frame from webcam with
VFW and create a UI thread, CEncThread, to encode the frame. The
OnCaptureVideo is invoked when the video frame is captured by the driver,
copy the frame data into global frame memory, and send a message to tell the
========================================
if (g_bFrameCopied == false) {
memcpy(g_szFrame, captureframe, size);
g_nFrameLength = size;
g_bFrameCopied = true;

========================================
The CEncThread will copy the video frame from global memory into local
memory and encode it with jpeg2000 codec:
========================================
if (g_bFrameCopied == true) {
memcpy(s_szFrame, g_szFrame, g_nFrameLength);
g_bFrameCopied = false;
}
m_Encode.CreateFromArray((unsigned char *)g_szFrame, FRAME_WIDTH,
FRAME_HEIGHT, 8, FRAME_WIDTH, false);
m_Encode.SetJpegQuality(10);
m_Encode.Encode(buffer,len,CXIMAGE_FORMAT_JP2);
========================================
After closing the program, I get an error at this statement:
========================================
========================================
I think that there maybe a few messages that invoke video callback function
in message queue after stopping the capturing process and disable the
work after CEncThread is closed. I want to know how to clear the message
queue???

 0
mmlabjs (29)
3/19/2007 2:10:38 PM
vc.mfc 33608 articles. 0 followers.

7 Replies
435 Views

Similar Articles

[PageSpeed] 45

My solution is:
================================================
g_bExit = true;

if (m_pVidCap != NULL) {
m_pVidCap->StopCapture();	 // Stop the processing
m_pVidCap->Destroy();         // Disable the callback function and
disconnect the driver
delete m_pVidCap;
}

{
0) == 0)
}
================================================
I insert the following code into callback function:
================================================
if (g_bExit)
return;
if (g_bFrameCopied == false) {
memcpy(g_szFrame, captureframe, size);
g_nFrameLength = size;
g_bFrameCopied = true;

================================================

"mmlab_js" wrote:

> Hi,
> I create a dialog-based application. I capture video frame from webcam with
> VFW and create a UI thread, CEncThread, to encode the frame. The
> OnCaptureVideo is invoked when the video frame is captured by the driver,
> copy the frame data into global frame memory, and send a message to tell the
> ========================================
> if (g_bFrameCopied == false) {
>       memcpy(g_szFrame, captureframe, size);
>       g_nFrameLength = size;
>       g_bFrameCopied = true;
>
> ========================================
> The CEncThread will copy the video frame from global memory into local
> memory and encode it with jpeg2000 codec:
> ========================================
>    if (g_bFrameCopied == true) {
>       memcpy(s_szFrame, g_szFrame, g_nFrameLength);
>       g_bFrameCopied = false;
>    }
>   m_Encode.CreateFromArray((unsigned char *)g_szFrame, FRAME_WIDTH,
> FRAME_HEIGHT, 8, FRAME_WIDTH, false);
>    m_Encode.SetJpegQuality(10);
>    m_Encode.Encode(buffer,len,CXIMAGE_FORMAT_JP2);
> ========================================
> After closing the program, I get an error at this statement:
> ========================================
> ========================================
> I think that there maybe a few messages that invoke video callback function
> in message queue after stopping the capturing process and disable the
> callback function. So, It still calls PostThreadMessage to tell CEncThread to
> work after CEncThread is closed. I want to know how to clear the message
> queue???

 0
mmlabjs (29)
3/19/2007 2:18:05 PM
By the way ... if your application is exiting ... you should end the
secondary thread gracefully ...... let it process the messages in message
queue ... post your own custom exit message in the queue ....

"mmlab_js" <mmlabjs@discussions.microsoft.com> wrote in message
news:0417D63A-E651-4B40-9CCB-91105B8B4FF4@microsoft.com...
> Hi,
> I create a dialog-based application. I capture video frame from webcam
> with
> VFW and create a UI thread, CEncThread, to encode the frame. The
> OnCaptureVideo is invoked when the video frame is captured by the driver,
> copy the frame data into global frame memory, and send a message to tell
> the
> ========================================
> if (g_bFrameCopied == false) {
>      memcpy(g_szFrame, captureframe, size);
>      g_nFrameLength = size;
>      g_bFrameCopied = true;
>
> 0);
> ========================================
> The CEncThread will copy the video frame from global memory into local
> memory and encode it with jpeg2000 codec:
> ========================================
>   if (g_bFrameCopied == true) {
>      memcpy(s_szFrame, g_szFrame, g_nFrameLength);
>      g_bFrameCopied = false;
>   }
>  m_Encode.CreateFromArray((unsigned char *)g_szFrame, FRAME_WIDTH,
> FRAME_HEIGHT, 8, FRAME_WIDTH, false);
>   m_Encode.SetJpegQuality(10);
>   m_Encode.Encode(buffer,len,CXIMAGE_FORMAT_JP2);
> ========================================
> After closing the program, I get an error at this statement:
> ========================================
> ========================================
> I think that there maybe a few messages that invoke video callback
> function
> in message queue after stopping the capturing process and disable the
> to
> work after CEncThread is closed. I want to know how to clear the message
> queue???


 0
mubi (160)
3/19/2007 2:30:16 PM
See below
On Mon, 19 Mar 2007 07:10:38 -0700, mmlab_js <mmlabjs@discussions.microsoft.com> wrote:

>Hi,
>I create a dialog-based application. I capture video frame from webcam with
>VFW and create a UI thread, CEncThread, to encode the frame. The
>OnCaptureVideo is invoked when the video frame is captured by the driver,
>copy the frame data into global frame memory, and send a message to tell the
>========================================
>if (g_bFrameCopied == false) {
>      memcpy(g_szFrame, captureframe, size);
>      g_nFrameLength = size;
>      g_bFrameCopied = true;
****
THis suggests you are using global variables to communicate with the thread.  This should
be considered a Really Bad Idea.  Since you have to copy anyway, why not copy to heap
memory, pass a pointer to this in via the WPARAM or LPARAM, and avoid the copy at the
target?
****
>
>========================================
>The CEncThread will copy the video frame from global memory into local
>memory and encode it with jpeg2000 codec:
>========================================
>   if (g_bFrameCopied == true) {
>      memcpy(s_szFrame, g_szFrame, g_nFrameLength);
>      g_bFrameCopied = false;
>   }
>  m_Encode.CreateFromArray((unsigned char *)g_szFrame, FRAME_WIDTH,
>FRAME_HEIGHT, 8, FRAME_WIDTH, false);
>   m_Encode.SetJpegQuality(10);
>   m_Encode.Encode(buffer,len,CXIMAGE_FORMAT_JP2);
>========================================
>After closing the program, I get an error at this statement:
>========================================
*****
THis seems a clumsy way to implement
why are you going for the raw API?
*****
>========================================
>I think that there maybe a few messages that invoke video callback function
>in message queue after stopping the capturing process and disable the
>work after CEncThread is closed. I want to know how to clear the message
>queue???
****
You did not get "an error".  You got a VERY SPECIFIC ERROR, such as an access fault,
assertion failure, etc.  In addition, you were told the line on which this occurred, and
you could use the debugger to determine the values of the variables involved.  Lacking all
this critical information, all we can say is that you have done something wrong and should
fix it.

Note that it is your responsibility to terminate the thread cleanly, and your
responsibility to see that the thread does not attempt to send messages to nonexist
windows and that you do not attempt to post messages to nonexistent threads.  This is just
a guess based on typical examples of such problems.
*****
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

 0
newcomer (15980)
3/19/2007 5:16:16 PM
"Joseph M. Newcomer" wrote:

> See below
> On Mon, 19 Mar 2007 07:10:38 -0700, mmlab_js <mmlabjs@discussions.microsoft.com> wrote:
>
> ****
> THis suggests you are using global variables to communicate with the thread.  This should
> be considered a Really Bad Idea.  Since you have to copy anyway, why not copy to heap
> memory, pass a pointer to this in via the WPARAM or LPARAM, and avoid the copy at the
> target?
> ****
That 's a good idea. Thank you.
So, I dynamically allocate a heap memory, copy the frame to heap, and pass
the pointer to encoding thread wia the WPARAM or LPARAM.
Encoding thread gets the pointer, encodes the frame pointered by pointer,
and finally release the heap memory. Right???
> *****
> THis seems a clumsy way to implement
> why are you going for the raw API?
> *****
Sorry, I don't know what's meaning of "the raw API".
Could you explain more?
> ****
> You did not get "an error".  You got a VERY SPECIFIC ERROR, such as an access fault,
> assertion failure, etc.  In addition, you were told the line on which this occurred, and
> you could use the debugger to determine the values of the variables involved.  Lacking all
> this critical information, all we can say is that you have done something wrong and should
> fix it.


 0
mmlabjs (29)
3/20/2007 2:35:13 AM

"Joseph M. Newcomer" wrote:

> See below
> On Mon, 19 Mar 2007 07:10:38 -0700, mmlab_js <mmlabjs@discussions.microsoft.com> wrote:
>
> >Hi,
> >I create a dialog-based application. I capture video frame from webcam with
> >VFW and create a UI thread, CEncThread, to encode the frame. The
> >OnCaptureVideo is invoked when the video frame is captured by the driver,
> >copy the frame data into global frame memory, and send a message to tell the
> >========================================
> >if (g_bFrameCopied == false) {
> >      memcpy(g_szFrame, captureframe, size);
> >      g_nFrameLength = size;
> >      g_bFrameCopied = true;
> ****
> THis suggests you are using global variables to communicate with the thread.  This should
> be considered a Really Bad Idea.  Since you have to copy anyway, why not copy to heap
> memory, pass a pointer to this in via the WPARAM or LPARAM, and avoid the copy at the
> target?
> ****
I capture frame from webcam and encode it with JPEG2000, repeatedly.
Callback function copies the frame into global memory and notifies the
CEncThread to process it. In order to reduce the time that CEncThread lock
the global memory, I copy the global memory into its local memory, and unlock
the global memory. CEncThread can process it, at the same time, callback
function can also copies the frame into global memory and again post the
thread message in CEncThread's message queue. Because the speed of encoding a
frame is slow than the callback function notifies the CEncThread, I think
there maybe a few WM_ENCODE_FRAME messages in CEncThread's message queue.

 0
mmlabjs (29)
3/20/2007 3:36:05 AM
See below...
On Mon, 19 Mar 2007 19:35:13 -0700, mmlab_js <mmlabjs@discussions.microsoft.com> wrote:

>"Joseph M. Newcomer" wrote:
>
>> See below
>> On Mon, 19 Mar 2007 07:10:38 -0700, mmlab_js <mmlabjs@discussions.microsoft.com> wrote:
>>
>> ****
>> THis suggests you are using global variables to communicate with the thread.  This should
>> be considered a Really Bad Idea.  Since you have to copy anyway, why not copy to heap
>> memory, pass a pointer to this in via the WPARAM or LPARAM, and avoid the copy at the
>> target?
>> ****
>That 's a good idea. Thank you.
>So, I dynamically allocate a heap memory, copy the frame to heap, and pass
>the pointer to encoding thread wia the WPARAM or LPARAM.
>Encoding thread gets the pointer, encodes the frame pointered by pointer,
>and finally release the heap memory. Right???
****
Right.  See my essay on worker threads on my MVP Tips site.
****
>> *****
>> THis seems a clumsy way to implement
>> why are you going for the raw API?
>> *****
>Sorry, I don't know what's meaning of "the raw API".
>Could you explain more?
****
You can use MFC methods for many window operations.  MFC is a library built on top of the
WIndows API.  For those things which MFC defines, there is very little reason to use the
Windows API methods;  So there is a PostThreadMessage of the CWinThread class which
already does what you want, but instead of using the method, you call the raw API
function, and consequently have to provide all the parameters which the method call
automatically provides for you.
*****
>> ****
>> You did not get "an error".  You got a VERY SPECIFIC ERROR, such as an access fault,
>> assertion failure, etc.  In addition, you were told the line on which this occurred, and
>> you could use the debugger to determine the values of the variables involved.  Lacking all
>> this critical information, all we can say is that you have done something wrong and should
>> fix it.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

 0
newcomer (15980)
3/21/2007 1:35:58 AM
See below...
On Mon, 19 Mar 2007 20:36:05 -0700, mmlab_js <mmlabjs@discussions.microsoft.com> wrote:

>
>
>"Joseph M. Newcomer" wrote:
>
>> See below
>> On Mon, 19 Mar 2007 07:10:38 -0700, mmlab_js <mmlabjs@discussions.microsoft.com> wrote:
>>
>> >Hi,
>> >I create a dialog-based application. I capture video frame from webcam with
>> >VFW and create a UI thread, CEncThread, to encode the frame. The
>> >OnCaptureVideo is invoked when the video frame is captured by the driver,
>> >copy the frame data into global frame memory, and send a message to tell the
>> >========================================
>> >if (g_bFrameCopied == false) {
>> >      memcpy(g_szFrame, captureframe, size);
>> >      g_nFrameLength = size;
>> >      g_bFrameCopied = true;
>> ****
>> THis suggests you are using global variables to communicate with the thread.  This should
>> be considered a Really Bad Idea.  Since you have to copy anyway, why not copy to heap
>> memory, pass a pointer to this in via the WPARAM or LPARAM, and avoid the copy at the
>> target?
>> ****
>I capture frame from webcam and encode it with JPEG2000, repeatedly.
>Callback function copies the frame into global memory and notifies the
>CEncThread to process it. In order to reduce the time that CEncThread lock
>the global memory, I copy the global memory into its local memory, and unlock
>the global memory. CEncThread can process it, at the same time, callback
>function can also copies the frame into global memory and again post the
>thread message in CEncThread's message queue. Because the speed of encoding a
>frame is slow than the callback function notifies the CEncThread, I think
>there maybe a few WM_ENCODE_FRAME messages in CEncThread's message queue.
****
Which is why it doesn't make any sense to use global memory or locks at all.  If you
allocate a block, you fill it, hand it off to the thread, allocate a new block and fill
it, and no locks at all are necessary!  Lock-free algorithms tend to be better mechanism
than using locks (yes, there's an implicit lock on the allocator, but it is a very quick
lock)
joe

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

 0
newcomer (15980)
3/21/2007 1:40:04 AM

Similar Artilces:

Find out who sent message having send as rights
Probally an easy question. If I have a group of users who can choose a from address in outlook and sent the message as that account listing in the from field, is there a way to tell who actually sent the message. So if Joe user was in Outlook and sent a message using the From and he choose JaneUser because he has the rights to, is there a way to show that Joe actually sent the message? go to ESM drill down to your server go to properties diagnostic Logging |MSExchangeIS |Mailbox |set |Send on Behalf of |Maximum go to event log you will see bunch of events tallikng you who send e-mail beh...

Displays when new messages are received
I have used Outlook at work and I just set it up on my home computer. At work, whenever a new message is received a small envelope appears in the taskbar, right next to the time on the start menu. Is there a way that I can set this feature up on my home computer??? What version of Outlook are you using? -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Having searched the archives, Jessica <dancin720@hotmail.com> typed: | I have used Outlook at work and I just set it up on my | home computer. At work, whenever a new message is | r...

error message messaging inerface has returned an unknown error
how do i remove the error message "messaging interface has t=returned an unknown error" from oganinze window. restatring outlook does not help. ...

outgoing emails trap in queue
some mails sending to a domain from exchanger server 2000 is trapped in queue. The queue status is Active or Retry, while others are Ready. I have installed another server which has no this problem. It shows the network has no problem. Can anyone know how to set the queue status to Ready and let all emails send out. Thanks. Hi, Have you tried the force connection option on that queue, what happends? Regards -- Ben Hoffman MCP (Win2000 Pro/Server & Exchange 2003 Admin) http://www.ExchangeIS.com "word 2.0" <word20@discussions.microsoft.com> wrote in message news:94F...

Clear Data ???
Hi, I'm new to GP and I have an issue with this term "Clear Data". Kinda scary. When I think of clearing data, I think of deleting data. I need to POPULATE the Resource Descriptions table and to do that you need to "clear data" ? Huh? How is clearing data, populating data? Can someone please explain what clear data actually does? I don't want to clear (delete) anything, I want to populate that table. Scary term.... Thx JPP Clear Data does exactly what you think it does - it DELETES data from tables. Why do you need to populate the Resource Des...

Clearing "Custom Footer" box
Is there a way to delete the contents of the "Custom Footer" option when going through the "Page Setup" menu? I would like to clear out all previously created custom footers and start fresh. Thanks. TC T Crosby, Go to FILE>PAGE SETUP>HEADER/FOOTER, click on the "Custom Footer button. A new dialog box will appear with three panes. Highlight th contents in each pane (one pane at a time) and hit delete. Hope this helps Case -- Message posted from http://www.ExcelForum.com You have some responses at your other post. T Crosby wrote: > > Is there a wa...

how to clear a PickList
hello, It will maybe seem easy for you. But i've been trying to do a simple thing. Delete the contents of a picklist. I populate this picklist at runtime. On the onchange event of another field I would like to clear the picklist. I've tried to set the picklist.Options to null. but i get an error. I also tried to assign the picklist an array but no results there. Anyone has the correct usage of this .Options method? how should be the array be configured, how many dimensions? Please hellp me i'm using CRM 3.0 thanks Eduardo Hi, Please take a look at the Microsoft C...

Newsgroup Messages
I'm new to the newsgroup business and I was wondering if you could sort the messages by the latest message that was posted. It's kind of like the typical forum and message board on the internet where people 'bump' the thread up so the thread with the latest message goes on top. Can anyone help? Thanks. KM wrote: > I'm new to the newsgroup business and I was wondering if you could > sort the messages by the latest message that was posted. It's kind of > like the typical forum and message board on the internet where people > 'bump' the thread up so t...

How to clear other files after remove old outlook profile
I use Outlook 2007, I add new profile and one new outlook1.ost has been created automaticly. Then I removed the old profile, but old outlook.ost still kept on my local disk, and there are many other files in the "Local Settings\Application Data\Microsoft\Outlook" directory. I want to kown which of them can be delete and how to remove all unuseful files after I remove corresponding email profile. Does following files can be deleted? outlook.ost/ uanrdex.oab/udetails.oab/updndex.oab/urdndex.oab You can delete those files but keep in mind that the next time Outlook sy...

Message archival
How to disable IMC message archival (folders ?:\exchsrvr\imcdata\in\Archive e ?:\exchsrvr\imcdata\out\Archive) ? Thanks in advance Max ...

Copy plain text message including sender, recipient, and subject
Is there a way to easily copy the plain text message including sender, recipient, and subject? I am looking for an easy way to copy this information so that I can paste it into a project log. Right now I am having to copy the message, then copy the sender, then copy the recipients individually, then copy the subject, etc... Certainly there's got to be a way to view the message entire message so that all of this information can be copied in one fell swoop... File-> Save As...-> select .txt as the file-format. -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuri...

Running Macro in Outlook 2003 to flag messages #2
Hello, I am looking for help please to do the following: 1) I want to flag messages, which arrive in a second/additional mailbox. 2) The flag colours will depend on specific words in the body of the mail. 3) I would like this to be done automatically via a Macro. I am using Outlook 2003 I have looked at various groups and think that it has to be done with an "ItemAdd event handler" and maybe a "Set objFolder = GetFolder" to walk up to the additional mailbox. Unfortunately, I am not a programmer so any and all help will be gratefully appreciated. Thank you in advance. Gord...

How to clear the calendar?!
I use Outlook with my pocketpc and synch with Yahoo calendar. Once in a while, like right now, I get a number of duplicates and would just like to clear all the calendar info. It would alright if it cleared all the email settings, too, I don't care. Anyone know how to do this? >I use Outlook with my pocketpc and synch with Yahoo calendar. Once in >a while, like right now, I get a number of duplicates and would just >like to clear all the calendar info. Change your Calendar view to "By Category". Select all entries and press DELETE. -- Brian Tillman Smiths Aerospa...

Client Droping unsent messages into sent mail
Missing Messages Question: Does Exchage confirm acceptance of a message, before messages are placed into the Outlook Client's Sent Folder? I used the Message Tracking Tool and 5 missing messages cannot be found. I also looked in \\program files\exchsrvr\servername.log\date.log, and the messages don't appear to be received by the Exchange Server Application. BUT, the messages do appear in the Outlook Client Sent folder. Whats Up with That? When I look at his laptop *.ost I see that the message is in his sent folder. Also on OWA on the Exchange server the message is in his Sen...

Clear all?
Is there a way to clear all inputs to an existing workbook - everything but the formulas? sdmccabe, one way, ctrl a to select all cells, then edit, goto, special, check constants, OK, delete -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "sdmccabe" <sdmccabe@discussions.microsoft.com> wrote in message news:086647A5-CBB5-49A3-9647-63745E07A737@microsoft.com... > Is there a way to clear all inputs to an existing wo...

The originator does not have permission to submit message #2
Hello all: I'm running and Exchange 5.5 server and I have this problem. I have a user that has two mail accounts, X and Y (for spam reasons). Both these accounts have under "Given Send On Behalf Of permission to:" the X and Y accounts. The reason this user is set up this why is that she wants to be able to specify (by typing in the from field) the return address to be one or the other of the two email accounts. She has MS Outlook 2k3 client set up with one of the email accounts. The problem I'm having is that sometimes his mails get bounced back by the our server wi...

I receive the below message quite often in my email.
I read email, then next time I'm on line I go back to the email and the message below is there. This happens often. This is fustrating. Message cannot be found The contents of this message cannot be found. Windows Live Mail Does 'next time I'm online' indicate that the internet connection was closed/disabled/turned off prior to going online ? Does 'next time I'm online' indicate that chose to use the Offline mode (in IE or Windows Live Mail[WLM]) ? If yes, to either of the above was WLM open when doing so ? What kind of email account ? Pop3, IMAP, ...

Clearing of list "Suggest names while completing To, CC and BBC fields"
Is it possible to clear this list, insted of deleting one of the time? Use Find to search for and rename or delete your <profilename>.NK2 file (where <profilename> is the name of your Outlook profile). -- PATRICK REED [Outlook - MVP]~~~~~~ -Microsoft Certified Professional (MCP) -Have you checked http://www.slipstick.com? -Please post your Outlook version! "Jan Hoff" <jhl@fujitsu.dk> wrote in message news:09a401c3c0a2$f5186f00$a301280a@phx.gbl... > Is it possible to clear this list, insted of deleting one > of the time? ...

Monitor Messages
Hi all I home this is an easy question, but does anyone know of a way in which I can monitor and find out how many messages are sent and recieved from our exchange server, is there a tool which can do this w On Wed, 9 Feb 2005 15:52:45 -0000, "WB" <wmb2003@zoom.co.uk> wrote: >Hi all > >I home this is an easy question, but does anyone know of a way in which I >can monitor and find out how many messages are sent and recieved from our >exchange server, is there a tool which can do this > >w > I'm mucking about with this one http://www.intern...

need cleared date for checks and other entries in checkbook
we are using Great Plains 8 and would find it helpful to have a field in the checkbook to enter the cleared date for each transaction ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default...

How to remove a Warning Message
I downloaded an Excel Add In and then removed same as it was no use. However every time I open Excel I get the message "C:\Program Files\Business Functions\BUSFUN.xla" could not be found. Please check.............etc Any suggestions on how to remove this annoying start message would be appreciated. Thanks David Hi David If you delete the file then go to Tools>Add-ins Click on the Add-in in the list It will ask you if you want to remove it -- Regards Ron de Bruin http://www.rondebruin.nl "David" <mckain@financenz.co.nz> wrote in message news:8e0101c432e...

can't send message
couldn't send message due to not configured to send emails Have you ever sent email successfully before? What is different now? Do you normally use webmail or Windows Mail? If the latter, who provides your mail service? Gary VanderMolen, Microsoft MVP (Mail) "carmen" wrote in message news:A61BD5BE-71E9-49FA-904E-9C37AED94707@microsoft.com... couldn't send message due to not configured to send emails ...

hi i want to set up a macro or something like it so that at a certain time of the day it will reset or clear the data in a cell! can any body help? pleaseeeeeeeeeeeeeeeeeeeee Take a look at the OnTime method in help, but this does mean your workbook has to open at all times. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ash" <anonymous@discussions.microsoft.com> wrote in message news:38b501c47eff$d36ca710$a501280a@phx.gbl... > hi i want to set up a macro or something like it s...