I am trying to use an Excel workbook that has links to Bloomberg data in. The data has been pulled from Bloomberg already. I then want to ensure that when I send this workbook to someone that they can use the sheet without a Bloomberg terminal connection. The user without the Bloomberg feed has set calculations to manual in Excel however when they try and save the workbook it automatically tries to update the fields and gives #NAME errors in the fields where Bloomberg values should be.
Is there a way to stop Excel from trying to refresh the Bloomberg links when the workbook is saved? I have tried VBA Workbook_AfterSave and Workbook_BeforeSave events but that did not seem to work.
A touch embarassed to admit but in Options > Formulas > Manual there is a check box for calculating the workbook before saving. I unchecked that and it worked.
According to the license, you're not supposed to remove values obtained using the API (Excel) from the computer where the Bloomberg Terminal is installed. That being said, if cells cease being Excel formulas they will no longer attempt to update to an up-to-date value. To do this, copy the cells that currently have a BDP/BDH formula and right click -> paste special -> values. This is also useful if you don't want the values refreshing every time you open the worksheet on the same computer.
Related
The Problem
I have an Excel workbook that prompts the user for some actions every time it is opened.
This same workbook contains charts that are linked in a PowerPoint file. These links were created by copying the charts in Excel and then, in the PowerPoint file, clicking "Paste Special", choosing "Paste Link", and selecting "Microsoft Excel Worksheet (code) Object" as the link type.
Every time the PowerPoint file is opened, I am prompted to update the links in the document.
The trouble is that, while PowerPoint is updating links, the Excel prompts that are intended for the user are shown and have to be clicked (multiple times) during the link update process.
Is it possible for my VBA code to detect when it's being opened for the purposes of updating links so I can skip the user prompts? I should note, in case it matters, that I'm using Microsoft Office 365 on Windows 10.
What I've Tried
I've tried monitoring the value of ThisWorkbook.ReadOnly, Application.Interactive, and Application.IsSandboxed during startup, but they all appear to have the same values regardless of whether the workbook is opened for the purposes of updating links or not. I'm not familiar enough with how link updating works to know what else to check for.
I've identified a couple of possible work-arounds:
First, if the Excel workbook is opened before PowerPoint is opened and the link update process starts, then the prompts don't appear. This will work, if there's no better solution.
Second, I could create a second "shadow" Excel workbook with charts generated from data in the first spreadsheet, but without user prompts. If PowerPoint links to the charts in the "shadow" workbook, then links are updated without issue. This is far from ideal because of the need to keep the two workbooks in sync.
I'm hoping for an elegant automated solution.
I have an Excel document that is used by everyone in the office. When someone is in it the rest use a read only or have to wait to update. I have created a new workbook that references the working copy. Eg cell contents are =path[document]Sheet!cell is there a way to automatically view changes as they are input on the working copy. This would be a read only solution but ideally a right up to date copy of the working workbook. A solution through excel or VBA button click would be ideal. Can you help. I have tried connections but it crashes and only updates on a close and save from another user. When I have both docs open on my computer updates are instant.
I have the following situation:
I created a rather gigantic excel workbook with a bunch of excel worksheets and a lot of cross-dependencies between worksheets in it and a lot of heavy formulas. I saved this file. When I open it on my laptop it doesn't try to automatically recalculate content since Excel realizes that data didn't change. When I make changes in data recalculation is fast since changes in data will be localized and won't affect the whole workbook making it possible to make adjustments to workbook without spending hours to wait for calculation completion.
When I give a copy of this workbook to anyone else and they open it on their PC it seems that Excel decides (not sure why - wasn't able to find any answer) to recalculate entire workbook. Probably that's a default behavior when excel file is opened on different PC.
Since workbook is huge recalculation of everything in it will take forever
Is there any way to force excel to assume that whichever values are populated in the cells right now are 'correct' (that all cells don't require recalculation) but still preserve the Automatic recalculation behavior when user changes something in the data? Basically, we need to remove 'dirty' status from all cells in the workbook when it is opened on new PC.
I can not answer Your question, but i may provide a solution for Your problem:
Have You tried to enter
Application.Calculation= xlCalculationManual
Application.CalculateBeforeSave=False
into the direct-window (Ctrl+G while in developers mode)?
You can reactivate the automatic calculation modes later, for example with an "Workbook_Change" -Event, or manually in the direct-window.
I have a few other possible "Work-arounds" in mind, please let me know, if you are interested. This might also help to understand Excels calculations: http://www.decisionmodels.com/calcsecrets.htm
I am currently working on an MS Excel 2013 spreadsheet (p:\master.xlsx) where some cells contain values that are directly linked from other MS Excel 2013 spreadsheets (p:\path1\feeder1.xlsx, p:\path1\feeder2.xlsx, etc).
What I am finding occasionally (not every time), is when I open up my p:\master.xlsx spreadsheet (and then "enable editing" and "enable content"), some of the values in this spreadsheet change from the correct linked value (a number) to value #REF.
When I look at the formula within these offending cells, I see it has also changed from say:
=MAX('P:\path1\[feeder1.xlsx]Sheet1'!$C:$C)
to
=MAX('P:\path1\[feeder1.xlsx]#REF'!$C:$C)
I can confirm the feeder.xlsx spreadsheet has not been moved or renamed and has not had it's values changed at all. The network drive the files sit on is also stable.
What is confusing me is that this appears to happen at random times (as opposed to every time). In addition, not all the cells revert to #REF - some of the values are still OK (and thus the formula is OK).
Due to not knowing if or when the formulas will change to their "#REF" status, I need to save the file every time I make a change (slightly frustrating).
I searched the forum and noticed another user had a similar issue on MS Excel 2010 but the answers provided did not appear to solve the user's issue. Anyone have any suggestions?
First make sure you're formula is not too long if your using 97-2003. if so save the file as .xlsx
if that don't work do the following
close all open workbooks.
open the workbook with the (now) broken links (#ref).
Click on the Data tab
Click on Edit Links.
Excel doesn't like links to closed workbooks
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to refresh/load RTD Bloomberg function (BDH) in excel in vba
I am working on an Excel Spreadsheet with VBA. I have a Bloomberg BDH function that I want to refresh from VBA. I tried recording a macro and clicking the Bloomberg->Refresh Workbooks button but the macro came up empty. How can I do this from code? I'm using Excel 2007 and I found one option of entering
Application.Run "blpmain.xla!RefreshAllStaticData"
but blpmain.xla can't be found. I'm not sure what version of Excel/BBG-Addin this was for.
Any help?
What I ended up doing was re-pasting down the bloomberg formulas in the appropriate ranges. This forced the data to redownload. Not the most ideal solution but it works.
Basically, unlike BDP...BDH doesn't refresh because its historical(H), if you want refresh it you need to resubmit your formula.
Maybe not the most elegant solution but what I do is change something in the BDH formula. So you can click on a button you make that takes the data and adds a day and then removes it back. That slight change causes it to refresh.
Another thing I used to do was have a BDH bring in all the historical data, but have the top column a BDP realtime feed so it kept freshing.
In the end, the easiest way is to have the users close the excel sheet at the end of the day and have them reopen it when they need it.
Are you sure you've set a reference to the addin?
Open a code module in the workbook in which you want to use the
Add-In's functions
Go to Tools > References to open the References dialog where you
will see a list of all the libraries and other objects (like
Add-Ins) to which you can set a reference.
Put a tick in the box next to the name and click the OK button.
Source
Once you've done this, you can refer directly to the xla function RefreshAllStaticData.