Vbscript to open excel and let calculate

mario92

New Member
Joined
Oct 16, 2011
Messages
43
Office Version
  1. 365
Platform
  1. Windows
Hi,

I need to write a script to open an excel file and then just stop and let the bloomberg links in the spreadsheet update/calculate. The problem is once it is open the links wont update as it seems excel is in some sort of edit mode. I've tried to write something in just vba (with excel) and not have any luck allowing bloomberg to update. I've researched it quite a bit and have tried versions of vba with do event or application.wait and nothing seems to work. I thought if i could open with a script i could call another vba program to do the rest (resave values and save) any suggestions would be helpful.....

create the excel object
Set objExcel = CreateObject("Excel.Application")

'view the excel program and file, set to false to hide the whole process
objExcel.Visible = True

'open an excel file (make sure to change the location) .xls for 2003 or earlier
Set objWorkbook = objExcel.Workbooks.Open("H:\Alt Marketing\Alt Team summary Template\Alts Performance Template.xlsx")

'release objects
'Set objExcel = Nothing
'Set objWorkbook = Nothing

Wscript.quit
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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