Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting up xlcOnTime using C

19 views
Skip to first unread message

Ai

unread,
May 18, 2010, 1:01:33 AM5/18/10
to
Hi I'm trying to setup up xlcOnTime using C with the codes as below.
This command is call by Application.Run in the Sub Workbook_Open.
Problem is it's updated less then 1 secs which is locking the user
out. Any idea where I go wrong?

int Test()
{
...

struct timeb tmb;
ftime(&tmb);
double now = tmb.millitm + 10.0 / (60.0 * 60.0 * 24.0); //supposely
10 secs later reference from Steve Dalton's book

XLOPER xTime, xCommand;
xTime.xltype = xltypeNum;
xTime.val.num = now;

xCommand.xltype = xltypeStr;
xCommand.val.str = " Test";

int result = Excel4(xlcOnTime, 0, 2, &xTime, &xCommand);

return 1;
}

0 new messages