macro opearation in a file to be performed in background

mahendra

New Member
Joined
May 4, 2009
Messages
5
hi,
I am working with a excel file having some auto open macro,which process my data and file closes automatically. but during this whole operation the excel window appears on my desktop for about one second. I need this excel window must not appear and all operations in excel must be performed in background only so that i can save my processing time.

thanks in advance. please help me.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
It is not clear what you want. any how add a code at the beginning
application.screenupdating=false
and then at the end before the end sub
application.screenupdating=true
 
Upvote 0
i have already incorporated these two comments these are helpful in hiding the all operations going inside the excel sheet but still file opens for a short duration,on my desktop. so i need that all this activity must be performed in background without opening the excel. please help me.
 
Upvote 0
Is the workbook being opened programatically? If so, is it being opened by another workbook's code?
 
Upvote 0
thanks for reply. I am opening these workbook through a batch file.in which autoopen macro performs required data processing inside the file and workbook closes automatically through macro.
 
Upvote 0
Okay. Sorry, but I know very little DOS. Maybe Kenneth Hobson or someone will stop by, but I don't see how you would be able to get it started in a hidden state.

If it is that much of a pain to have the file "flash" for a second, could the batch file run a .vbs script instead? I think you could use the .vbs file to create excel and open the file without being visible.

Just out of cureiousity, what's the command line look like? Do you use Start? (Sorry, as stated very little knowledge on top of a bad memory)

Mark
 
Upvote 0
As Mark suggested you could run a VBS program instead of the Excel program.

example:

Open NotePad Place in it the following 2 lines and save it with a .vbs extension.

Code:
Set oHiddenExcelInstance = CreateObject("Excel.Application")
oHiddenExcelInstance.Workbooks.Open " Enter your Workbook Path & Name here"

Then , from the commandline run the vbs script.

Regards.
 
Upvote 0

Forum statistics

Threads
1,215,745
Messages
6,126,630
Members
449,323
Latest member
Smarti1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top