Execute XL invisible

  • Thread starter Sri via OfficeKB.com
  • Start date
S

Sri via OfficeKB.com

Hello,

I prepare one macro and placed it "Workbook_Open()" and at the end, I said
"Me.Save" and "ActiveWorkbook.Close" to close the workbook.

I created a scheduled task with the "Scheduler" (in control panel) to open
the above XL file once in every 30 minutes.

When ever this file is opened by "Scheduler", I see a new XL window opening
in my task bar and closes after the macro is finished.

Is there a way I can hide this XL window so that user does not know about it
at all.

Thanks
Sri
 
L

Luke M

I don'tt believe so. XL needs to open at least enough to run your worksheet,
so even if you use
application.screenupdating=false
you'll still see the application open.

Also, what you're describing is very similar to what a virus would do, thus
reinforcing my belief that this can not be done.
 
D

Dave Peterson

I don't have a guess.

But if you don't get an answer (that you like) here, you may want to ask in one
of the VB or Scripting forums.
 
J

Jim Cone

Maybe...
Tools | Options | View (tab)
and uncheck Windows In TaskBar.
--
Jim Cone
Portland, Oregon USA


"Sri via OfficeKB.com"
wrote in message Hello,
I prepare one macro and placed it "Workbook_Open()" and at the end, I said
"Me.Save" and "ActiveWorkbook.Close" to close the workbook.
I created a scheduled task with the "Scheduler" (in control panel) to open
the above XL file once in every 30 minutes.
When ever this file is opened by "Scheduler", I see a new XL window opening
in my task bar and closes after the macro is finished.
Is there a way I can hide this XL window so that user does not know about it
at all.
Thanks
Sri
 
T

Tim Williams

Instead of opening the XL file directly, have the Scheduler run a samall VB
script which creates an Excel appplication instance (using createobject) and
then opens the file in that instance. Unless you explicitly set
visible=true on the Excel application instance, you shouldn't see it.

Tim
 
U

urkec

Sri via OfficeKB.com said:
Hello,

I prepare one macro and placed it "Workbook_Open()" and at the end, I said
"Me.Save" and "ActiveWorkbook.Close" to close the workbook.

I created a scheduled task with the "Scheduler" (in control panel) to open
the above XL file once in every 30 minutes.

When ever this file is opened by "Scheduler", I see a new XL window opening
in my task bar and closes after the macro is finished.

Is there a way I can hide this XL window so that user does not know about it
at all.

Thanks
Sri

I have several VBS scripts that collect data over the network and store it
in Excel sheets. I create Excel as automation object:

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.DisplayAlerts = False

then I open or create a workbook write the data save and quit. The
Excel.Application instance is not visible in taskbar, but it is still visible
in Windows Task Manager under Processes tab, which is convenient, because I
don't want users to see it, but also to have a way to terminate it if it
hangs.

When using Scheduled tasks, there is also an option to run a task under a
user account different than the currently logged on user. If you do that the
task will also be invisible to the logged on user, except for Windows Task
Manager.

I still use Windows XP, so I don't know about possible changes in Vista.
 
S

Sri via OfficeKB.com

Thank you all for your replies.

I tried "Application.Visible=False" at the begining of my macro and
"Application.Quit" at the end of macro. It works fine (excel window is
invisible) but EXCEL.EXE task is not closed in my task bar.

If I see my taskbar (ctrl+alt+del), I see one EXCEL.EXE process being added
in "Processes" every time my macro runs but nothing in "Applications" tab. Is
there a way to stop this process also.

Most of you are suggesting me to write some VB script with which start an
excel instance in "invisible" mode. But the main problem with me is I do not
know anything (how to write / where to write / how to execute etc..) about VB.
I can use VB only with excel. What I know is to put some commands in the "VB
Editor of the Excel" and execute them.

Any help with regard to VB is also fine for me.

Thank all for your support.
Sri
[quoted text clipped - 12 lines]
Thanks
Sri

I have several VBS scripts that collect data over the network and store it
in Excel sheets. I create Excel as automation object:

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.DisplayAlerts = False

then I open or create a workbook write the data save and quit. The
Excel.Application instance is not visible in taskbar, but it is still visible
in Windows Task Manager under Processes tab, which is convenient, because I
don't want users to see it, but also to have a way to terminate it if it
hangs.

When using Scheduled tasks, there is also an option to run a task under a
user account different than the currently logged on user. If you do that the
task will also be invisible to the logged on user, except for Windows Task
Manager.

I still use Windows XP, so I don't know about possible changes in Vista.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top