PC Review


Reply
Thread Tools Rate Thread

Auto Macro and Locked PC

 
 
Vinny P
Guest
Posts: n/a
 
      25th Feb 2008
I created a auto run macro in Excel using VBA. An access database kicks off
via windows scheduler and creates data files needed by excel. Once the files
have been created, before access closes, it opens the excel spreadsheet where
the auto run macro is stored. This process is set for early in the morning,
but it seems to stall or "pause" after excel starts. Once I unlock the
machine, the macro "unpauses". Is this an excel issue? Is their code to
prevent this from happening?
 
Reply With Quote
 
 
 
 
John Bundy
Guest
Posts: n/a
 
      25th Feb 2008
Does your machine require you to sign on with a password? I built an auto
scheduler and found that newer (2003+) versions of windows require that a
password be set on the machine, or the machine has to be unlocked to run a
scheduled task. Someone else might have more info on the subject.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Vinny P" wrote:

> I created a auto run macro in Excel using VBA. An access database kicks off
> via windows scheduler and creates data files needed by excel. Once the files
> have been created, before access closes, it opens the excel spreadsheet where
> the auto run macro is stored. This process is set for early in the morning,
> but it seems to stall or "pause" after excel starts. Once I unlock the
> machine, the macro "unpauses". Is this an excel issue? Is their code to
> prevent this from happening?

 
Reply With Quote
 
Vinny P
Guest
Posts: n/a
 
      25th Feb 2008
Yes, however, windows scheduler works fine. My User name and pw is stored.
The scheduler kicks of the access macro first and access calls excel. Its
when the excel macro begins, the code appears to be stuck ONLY when the pc is
in a locked state.

"John Bundy" wrote:

> Does your machine require you to sign on with a password? I built an auto
> scheduler and found that newer (2003+) versions of windows require that a
> password be set on the machine, or the machine has to be unlocked to run a
> scheduled task. Someone else might have more info on the subject.
> --
> -John
> Please rate when your question is answered to help us and others know what
> is helpful.
>
>
> "Vinny P" wrote:
>
> > I created a auto run macro in Excel using VBA. An access database kicks off
> > via windows scheduler and creates data files needed by excel. Once the files
> > have been created, before access closes, it opens the excel spreadsheet where
> > the auto run macro is stored. This process is set for early in the morning,
> > but it seems to stall or "pause" after excel starts. Once I unlock the
> > machine, the macro "unpauses". Is this an excel issue? Is their code to
> > prevent this from happening?

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      25th Feb 2008
Could excel be waiting for a user to allow macros to run?

Could your code be waiting for a user to dismiss a msgbox?

Vinny P wrote:
>
> Yes, however, windows scheduler works fine. My User name and pw is stored.
> The scheduler kicks of the access macro first and access calls excel. Its
> when the excel macro begins, the code appears to be stuck ONLY when the pc is
> in a locked state.
>
> "John Bundy" wrote:
>
> > Does your machine require you to sign on with a password? I built an auto
> > scheduler and found that newer (2003+) versions of windows require that a
> > password be set on the machine, or the machine has to be unlocked to run a
> > scheduled task. Someone else might have more info on the subject.
> > --
> > -John
> > Please rate when your question is answered to help us and others know what
> > is helpful.
> >
> >
> > "Vinny P" wrote:
> >
> > > I created a auto run macro in Excel using VBA. An access database kicks off
> > > via windows scheduler and creates data files needed by excel. Once the files
> > > have been created, before access closes, it opens the excel spreadsheet where
> > > the auto run macro is stored. This process is set for early in the morning,
> > > but it seems to stall or "pause" after excel starts. Once I unlock the
> > > machine, the macro "unpauses". Is this an excel issue? Is their code to
> > > prevent this from happening?


--

Dave Peterson
 
Reply With Quote
 
Vinny P
Guest
Posts: n/a
 
      25th Feb 2008
Thats what it seems like, but the macro does not require user input. No
message boxes. Perhaps it is something in my code preventing excel from
running while locked?

"Dave Peterson" wrote:

> Could excel be waiting for a user to allow macros to run?
>
> Could your code be waiting for a user to dismiss a msgbox?
>
> Vinny P wrote:
> >
> > Yes, however, windows scheduler works fine. My User name and pw is stored.
> > The scheduler kicks of the access macro first and access calls excel. Its
> > when the excel macro begins, the code appears to be stuck ONLY when the pc is
> > in a locked state.
> >
> > "John Bundy" wrote:
> >
> > > Does your machine require you to sign on with a password? I built an auto
> > > scheduler and found that newer (2003+) versions of windows require that a
> > > password be set on the machine, or the machine has to be unlocked to run a
> > > scheduled task. Someone else might have more info on the subject.
> > > --
> > > -John
> > > Please rate when your question is answered to help us and others know what
> > > is helpful.
> > >
> > >
> > > "Vinny P" wrote:
> > >
> > > > I created a auto run macro in Excel using VBA. An access database kicks off
> > > > via windows scheduler and creates data files needed by excel. Once the files
> > > > have been created, before access closes, it opens the excel spreadsheet where
> > > > the auto run macro is stored. This process is set for early in the morning,
> > > > but it seems to stall or "pause" after excel starts. Once I unlock the
> > > > machine, the macro "unpauses". Is this an excel issue? Is their code to
> > > > prevent this from happening?

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
John Bundy
Guest
Posts: n/a
 
      25th Feb 2008
If it is waiting for someone to approve macro's as Dave suggested, you can
get a certificate such as selfcert (the one i use, free) and you can
digitally sign your work, once accepted, the accept macro box no longer shows
up.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Vinny P" wrote:

> Thats what it seems like, but the macro does not require user input. No
> message boxes. Perhaps it is something in my code preventing excel from
> running while locked?
>
> "Dave Peterson" wrote:
>
> > Could excel be waiting for a user to allow macros to run?
> >
> > Could your code be waiting for a user to dismiss a msgbox?
> >
> > Vinny P wrote:
> > >
> > > Yes, however, windows scheduler works fine. My User name and pw is stored.
> > > The scheduler kicks of the access macro first and access calls excel. Its
> > > when the excel macro begins, the code appears to be stuck ONLY when the pc is
> > > in a locked state.
> > >
> > > "John Bundy" wrote:
> > >
> > > > Does your machine require you to sign on with a password? I built an auto
> > > > scheduler and found that newer (2003+) versions of windows require that a
> > > > password be set on the machine, or the machine has to be unlocked to run a
> > > > scheduled task. Someone else might have more info on the subject.
> > > > --
> > > > -John
> > > > Please rate when your question is answered to help us and others know what
> > > > is helpful.
> > > >
> > > >
> > > > "Vinny P" wrote:
> > > >
> > > > > I created a auto run macro in Excel using VBA. An access database kicks off
> > > > > via windows scheduler and creates data files needed by excel. Once the files
> > > > > have been created, before access closes, it opens the excel spreadsheet where
> > > > > the auto run macro is stored. This process is set for early in the morning,
> > > > > but it seems to stall or "pause" after excel starts. Once I unlock the
> > > > > machine, the macro "unpauses". Is this an excel issue? Is their code to
> > > > > prevent this from happening?

> >
> > --
> >
> > Dave Peterson
> >

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      25th Feb 2008
Or change the security level to the lowest choice to allow every macro to run.
MS doesn't recommend this.

Vinny P wrote:
>
> Thats what it seems like, but the macro does not require user input. No
> message boxes. Perhaps it is something in my code preventing excel from
> running while locked?
>
> "Dave Peterson" wrote:
>
> > Could excel be waiting for a user to allow macros to run?
> >
> > Could your code be waiting for a user to dismiss a msgbox?
> >
> > Vinny P wrote:
> > >
> > > Yes, however, windows scheduler works fine. My User name and pw is stored.
> > > The scheduler kicks of the access macro first and access calls excel. Its
> > > when the excel macro begins, the code appears to be stuck ONLY when the pc is
> > > in a locked state.
> > >
> > > "John Bundy" wrote:
> > >
> > > > Does your machine require you to sign on with a password? I built an auto
> > > > scheduler and found that newer (2003+) versions of windows require that a
> > > > password be set on the machine, or the machine has to be unlocked to run a
> > > > scheduled task. Someone else might have more info on the subject.
> > > > --
> > > > -John
> > > > Please rate when your question is answered to help us and others know what
> > > > is helpful.
> > > >
> > > >
> > > > "Vinny P" wrote:
> > > >
> > > > > I created a auto run macro in Excel using VBA. An access database kicks off
> > > > > via windows scheduler and creates data files needed by excel. Once the files
> > > > > have been created, before access closes, it opens the excel spreadsheet where
> > > > > the auto run macro is stored. This process is set for early in the morning,
> > > > > but it seems to stall or "pause" after excel starts. Once I unlock the
> > > > > machine, the macro "unpauses". Is this an excel issue? Is their code to
> > > > > prevent this from happening?

> >
> > --
> >
> > Dave Peterson
> >


--

Dave Peterson
 
Reply With Quote
 
Vinny P
Guest
Posts: n/a
 
      25th Feb 2008
I installed the digital cert, but still experiencing the same issue.

Here is the line in the access macro that triggers excel..
' Open Excel Cash-Two_Auto.xls
Call Shell("""C:\Program Files\Microsoft Office
2003\OFFICE11\EXCEL.exe""
""\\fiscmmk204win\common\nfs\dmn6\users\margin\U_Debits\Macros\cash-two_auto.xls""", 1)

Once excel launches, I created a Workbook_Open Macro
the first line calls a sub function. I am not sure if the macro is pausing
at workbook_open or the first call.

WorkBook_Open macro..
Private Sub Workbook_Open()

' Shut off Warning Messages
Application.DisplayAlerts = False

' Run Cash Due Items for Retail
Call CASHdueTWO

Here is a few lines from "Call CashDueTwo"
AppActivate "MICROSOFT EXCEL"
Workbooks.OpenText Filename:="G:\apps\DOWNLOAD\MARGIN\CES.TXT", Origin _
:=xlWindows, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:=Array(Array _
(0, 2), Array(3, 2), Array(9, 9), Array(10, 1), Array(26, 9),
Array(27, 1), Array(43, 3))
Workbooks.OpenText Filename:="G:\apps\DOWNLOAD\MARGIN\SBI.TXT", Origin _
:=xlWindows, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:=Array(Array _
(0, 2), Array(3, 2), Array(9, 9), Array(10, 1), Array(26, 9),
Array(27, 1), Array(43, 3))
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Windows("CES.TXT").Activate
Columns("A:A").Select
SendKeys "^{end}", True
SendKeys "{home}", True
SendKeys "{down 2}", True
Windows("SBI.TXT").Activate
Selection.Copy

"John Bundy" wrote:

> If it is waiting for someone to approve macro's as Dave suggested, you can
> get a certificate such as selfcert (the one i use, free) and you can
> digitally sign your work, once accepted, the accept macro box no longer shows
> up.
> --
> -John
> Please rate when your question is answered to help us and others know what
> is helpful.
>
>
> "Vinny P" wrote:
>
> > Thats what it seems like, but the macro does not require user input. No
> > message boxes. Perhaps it is something in my code preventing excel from
> > running while locked?
> >
> > "Dave Peterson" wrote:
> >
> > > Could excel be waiting for a user to allow macros to run?
> > >
> > > Could your code be waiting for a user to dismiss a msgbox?
> > >
> > > Vinny P wrote:
> > > >
> > > > Yes, however, windows scheduler works fine. My User name and pw is stored.
> > > > The scheduler kicks of the access macro first and access calls excel. Its
> > > > when the excel macro begins, the code appears to be stuck ONLY when the pc is
> > > > in a locked state.
> > > >
> > > > "John Bundy" wrote:
> > > >
> > > > > Does your machine require you to sign on with a password? I built an auto
> > > > > scheduler and found that newer (2003+) versions of windows require that a
> > > > > password be set on the machine, or the machine has to be unlocked to run a
> > > > > scheduled task. Someone else might have more info on the subject.
> > > > > --
> > > > > -John
> > > > > Please rate when your question is answered to help us and others know what
> > > > > is helpful.
> > > > >
> > > > >
> > > > > "Vinny P" wrote:
> > > > >
> > > > > > I created a auto run macro in Excel using VBA. An access database kicks off
> > > > > > via windows scheduler and creates data files needed by excel. Once the files
> > > > > > have been created, before access closes, it opens the excel spreadsheet where
> > > > > > the auto run macro is stored. This process is set for early in the morning,
> > > > > > but it seems to stall or "pause" after excel starts. Once I unlock the
> > > > > > machine, the macro "unpauses". Is this an excel issue? Is their code to
> > > > > > prevent this from happening?
> > >
> > > --
> > >
> > > Dave Peterson
> > >

 
Reply With Quote
 
Vinny P
Guest
Posts: n/a
 
      25th Feb 2008

My apologies everyone. Please forgive my ignorance. I was using a macro
created by a previous manager. I realized after evaluating each step where
the bottleneck was. The macro was pausing at the SendKeys command. I smply
replaced the commands and the macro ran with no issues.

Thanks again for all your help. At least I walked away not only learning how
to dissect a macro line for line, I also understand the use of digital certs.

Thanks again.

"Dave Peterson" wrote:

> Or change the security level to the lowest choice to allow every macro to run.
> MS doesn't recommend this.
>
> Vinny P wrote:
> >
> > Thats what it seems like, but the macro does not require user input. No
> > message boxes. Perhaps it is something in my code preventing excel from
> > running while locked?
> >
> > "Dave Peterson" wrote:
> >
> > > Could excel be waiting for a user to allow macros to run?
> > >
> > > Could your code be waiting for a user to dismiss a msgbox?
> > >
> > > Vinny P wrote:
> > > >
> > > > Yes, however, windows scheduler works fine. My User name and pw is stored.
> > > > The scheduler kicks of the access macro first and access calls excel. Its
> > > > when the excel macro begins, the code appears to be stuck ONLY when the pc is
> > > > in a locked state.
> > > >
> > > > "John Bundy" wrote:
> > > >
> > > > > Does your machine require you to sign on with a password? I built an auto
> > > > > scheduler and found that newer (2003+) versions of windows require that a
> > > > > password be set on the machine, or the machine has to be unlocked to run a
> > > > > scheduled task. Someone else might have more info on the subject.
> > > > > --
> > > > > -John
> > > > > Please rate when your question is answered to help us and others know what
> > > > > is helpful.
> > > > >
> > > > >
> > > > > "Vinny P" wrote:
> > > > >
> > > > > > I created a auto run macro in Excel using VBA. An access database kicks off
> > > > > > via windows scheduler and creates data files needed by excel. Once the files
> > > > > > have been created, before access closes, it opens the excel spreadsheet where
> > > > > > the auto run macro is stored. This process is set for early in the morning,
> > > > > > but it seems to stall or "pause" after excel starts. Once I unlock the
> > > > > > machine, the macro "unpauses". Is this an excel issue? Is their code to
> > > > > > prevent this from happening?
> > >
> > > --
> > >
> > > Dave Peterson
> > >

>
> --
>
> Dave Peterson
>

 
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
HELP!! Auto Filter Locked! Marisa Microsoft Excel Crashes 1 28th Jun 2008 04:48 PM
auto locked screen rexmann Windows XP General 2 16th Jun 2008 09:22 AM
Macro doesn't work on form or Macro timing and locked table Mike Microsoft Access 1 25th May 2007 03:47 PM
Macro - Playing Macro if cells are locked sonar Microsoft Excel Programming 1 1st May 2004 03:13 AM
auto update locked me out Katherine Naau Windows XP Security 0 12th Jul 2003 08:08 PM


Features
 

Advertising
 

Newsgroups
 


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