ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Background task (https://www.excelbanter.com/excel-programming/318745-background-task.html)

Jos Vens[_2_]

Background task
 
Hi,

is it possible to let excel do things in background (and let the user work
when the task is running). I'm thinking of the idle time a user is starring
at his screen and then, I could open a sheet in background (hidden window).
When he/she clicks on a button, making the sheet visible would be much
faster than opening the sheet at that time.

So, I want the user let work when my background task is running (slower is
not a problem).

Thanks,
Jos Vens



Robin Hammond[_2_]

Background task
 
Jos,

It rather depends on what you have in mind. The best thing I can think of
would be a modeless form that is running but not visible with a timer
control running at periodic intervals, but this is not trivial and you would
have to be careful about what you put in the routine. You also have to be in
XL2000 or higher since modeless forms aren't possible in XL97. For an
example that you could adapt, have a look at my VBA timer activex control
he

http://www.enhanceddatasystems.com/E...ExcelTimer.htm

Other approaches would be to
use the OnTime method, although I find this horribly crude and if it fails
once because the user is editing a cell it will not run again,
or look at using the Windows timer APIs and callbacks.

Robin Hammond
www.enhanceddatasystems.com

"Jos Vens" wrote in message
...
Hi,

is it possible to let excel do things in background (and let the user work
when the task is running). I'm thinking of the idle time a user is
starring at his screen and then, I could open a sheet in background
(hidden window). When he/she clicks on a button, making the sheet visible
would be much faster than opening the sheet at that time.

So, I want the user let work when my background task is running (slower is
not a problem).

Thanks,
Jos Vens




Jos Vens[_2_]

Background task
 
Hi Robin,

thanks for your reply. The thing I have in mind is opening a worksheet in
background. When you do it now, all possible action of the user stops, but
if you could do it in background, the user can do some input and if he needs
the layout of the sheet, you can simply make it fast visible because it is
already loaded in memory.

Thanks again, but I guess this will not be possible...
Jos

(my layout is a heavy one and takes about 10s to load, even more in a
network)


"Robin Hammond" schreef in bericht
...
Jos,

It rather depends on what you have in mind. The best thing I can think of
would be a modeless form that is running but not visible with a timer
control running at periodic intervals, but this is not trivial and you
would have to be careful about what you put in the routine. You also have
to be in XL2000 or higher since modeless forms aren't possible in XL97.
For an example that you could adapt, have a look at my VBA timer activex
control he

http://www.enhanceddatasystems.com/E...ExcelTimer.htm

Other approaches would be to
use the OnTime method, although I find this horribly crude and if it fails
once because the user is editing a cell it will not run again,
or look at using the Windows timer APIs and callbacks.

Robin Hammond
www.enhanceddatasystems.com

"Jos Vens" wrote in message
...
Hi,

is it possible to let excel do things in background (and let the user
work when the task is running). I'm thinking of the idle time a user is
starring at his screen and then, I could open a sheet in background
(hidden window). When he/she clicks on a button, making the sheet visible
would be much faster than opening the sheet at that time.

So, I want the user let work when my background task is running (slower
is not a problem).

Thanks,
Jos Vens






Jos Vens[_2_]

Background task
 
Robin,

you did understand I meant opening a workbook in background!

Jos

"Robin Hammond" schreef in bericht
...
Jos,

It rather depends on what you have in mind. The best thing I can think of
would be a modeless form that is running but not visible with a timer
control running at periodic intervals, but this is not trivial and you
would have to be careful about what you put in the routine. You also have
to be in XL2000 or higher since modeless forms aren't possible in XL97.
For an example that you could adapt, have a look at my VBA timer activex
control he

http://www.enhanceddatasystems.com/E...ExcelTimer.htm

Other approaches would be to
use the OnTime method, although I find this horribly crude and if it fails
once because the user is editing a cell it will not run again,
or look at using the Windows timer APIs and callbacks.

Robin Hammond
www.enhanceddatasystems.com

"Jos Vens" wrote in message
...
Hi,

is it possible to let excel do things in background (and let the user
work when the task is running). I'm thinking of the idle time a user is
starring at his screen and then, I could open a sheet in background
(hidden window). When he/she clicks on a button, making the sheet visible
would be much faster than opening the sheet at that time.

So, I want the user let work when my background task is running (slower
is not a problem).

Thanks,
Jos Vens







All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com