Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can VBA Programs Run on a Locked PC

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Can VBA Programs Run on a Locked PC


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"
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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Can VBA Programs Run on a Locked PC

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"
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
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
Locked worksheet & hyperlinks (w/ select locked cells unchecked) dgold82 Excel Discussion (Misc queries) 1 July 10th 09 09:42 PM
where do you put programs? console1 Excel Programming 2 September 5th 07 08:45 PM
Put comments on a locked spreadsheet even though cells not locked RDP Excel Worksheet Functions 1 September 11th 05 11:59 PM
I want the macros to be locked up when cells are locked up. Ed Excel Programming 6 February 20th 05 01:31 AM


All times are GMT +1. The time now is 11:00 AM.

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"