PC Review


Reply
Thread Tools Rate Thread

Can VBA Programs Run on a Locked PC

 
 
Wayne
Guest
Posts: n/a
 
      10th Aug 2009
I have a Excel VBA program that requires around 10 hours of run time.
It accesses multiple files and extracts data. I would like to lock my
PC while the PC is running. The program runs fine as long as I don't
lock (ctrl-alt-del-enter) the PC. I've tried inserting the
LockWorkStation function (see below) in various spots in my code which
does lock the PC but the program still stops running.

Private Declare Function LockWorkStation Lib "user32.dll" () As Long

Does VBA only run on an unlocked PC?

 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      10th Aug 2009

Most keyboard commands will not interfere with a running macro.
A hand lettered sign placed on the computer, with a date, stating that
a program is running should prevent interruption by co-workers.
However...

The Application.Interactive property may do what you want or
even the Application.EnableCancelKey property.
Be careful what you wish for. <g>

Not much can prevent someone, up to no good, from cutting off the power.
--
Jim Cone
Portland, Oregon USA



"Wayne" <(E-Mail Removed)>
wrote in message
I have a Excel VBA program that requires around 10 hours of run time.
It accesses multiple files and extracts data. I would like to lock my
PC while the PC is running. The program runs fine as long as I don't
lock (ctrl-alt-del-enter) the PC. I've tried inserting the
LockWorkStation function (see below) in various spots in my code which
does lock the PC but the program still stops running.

Private Declare Function LockWorkStation Lib "user32.dll" () As Long

Does VBA only run on an unlocked PC?

 
Reply With Quote
 
Derrick
Guest
Posts: n/a
 
      10th Aug 2009
haha nice jim.
on the same train of thought, you might as well unplug your monitor. if it
looks broken, nobody will use it.

"Jim Cone" wrote:

>
> Most keyboard commands will not interfere with a running macro.
> A hand lettered sign placed on the computer, with a date, stating that
> a program is running should prevent interruption by co-workers.
> However...
>
> The Application.Interactive property may do what you want or
> even the Application.EnableCancelKey property.
> Be careful what you wish for. <g>
>
> Not much can prevent someone, up to no good, from cutting off the power.
> --
> Jim Cone
> Portland, Oregon USA
>
>
>
> "Wayne" <(E-Mail Removed)>
> wrote in message
> I have a Excel VBA program that requires around 10 hours of run time.
> It accesses multiple files and extracts data. I would like to lock my
> PC while the PC is running. The program runs fine as long as I don't
> lock (ctrl-alt-del-enter) the PC. I've tried inserting the
> LockWorkStation function (see below) in various spots in my code which
> does lock the PC but the program still stops running.
>
> Private Declare Function LockWorkStation Lib "user32.dll" () As Long
>
> Does VBA only run on an unlocked PC?
>
>

 
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
Locked out of most Windows Programs =?Utf-8?B?RHVtYkZvdW5kZWQ=?= Windows Vista Administration 3 21st Nov 2007 10:07 PM
locked out of all programs =?Utf-8?B?SG9ja2V5Nzc2Ng==?= Windows XP Security 2 8th Jul 2006 02:05 PM
Locked out of Add or Remove Programs =?Utf-8?B?U2NvdHR5dDY3MjAz?= Windows XP Help 16 14th Dec 2005 04:03 AM
locked programs bob Windows XP Accessibility 2 21st Jun 2004 11:29 AM
Microsoft stinks Programs locked up Lloyd Windows XP Accessibility 0 24th Aug 2003 02:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:27 PM.