I’m attempting to migrate an existing excel sheet from using links to using data connections to other excel workbooks (Excel 2010). Upon switching my first couple cells, I refreshed the connection to test it out, and while the cells populated just as I’d hoped, excel actually opened the sheet I was connecting to on top of the sheet I was working on. I did see a suggestion somewhere that implied making it a shared workbook would help, but to make the data connections work as desired, I had to create a table on a background tab, so sharing the workbook is not possible.
Is there a way to suppress the sheet I’m connecting to from opening up? I don’t want to go too far down this rabbithole if it’s always going to do this.
Bonus: VBA code for automatically refreshing links every few minutes when the sheet is open, if it’s possible (rather than having the user press a button at will), may prevent me from having to migrate over to using connections to begin with. I’ve just not had much luck finding any that might work so far.
Please let me know if you require further clarification! Thanks!
Related
I have a userform in excel VBA that about 40 people use. When submitting data through the userform to write on the sheet it works perfectly. However, I tested with 5 users simultaneously using this same form and it seems like OneDrive syncing starts to mess up with the submitions (lines are being overwritten).
Is there a work around so that this overwritting does not happen when users are submiting data simultaneously?
You haven't provided much information about how you've set this up or how it's used but, as I'm picturing the shared workbook, you could determine and "reserve" the destination location upon opening of the userform, instead of upon completion.
There are a number of issues you'd have to work through, as co-authoring in this way can be tricky, and this is not ideal. Ideally you'd be transitioning to MS Access or another relational database. (If you already know some basic VBA, the learning curve isn't as steep as it might seem.)
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'm trying to learn better excel skills by working on a hobby project. Currently, my Excel workbook grabs data from an online database and archives it via command button. When I need to, I can look at a summary sheet which analyzes the data and presents it nicely.
The problem is that I need this data to be continuous and if I'm not around to click the command button it will have gaps in the data. The more accurate the better. So, I'm looking for a way that the workbook can be opened, updated and closed without me around. Better yet, if this is possible with something like OneDrive so I don't need my pc on all day - that would be the best solution.
Can anyone suggest a way for this auto-update process to work and/or inform me if OneDrive is capable of doing it also?
This is a common problem I've had for years and I'm sure many others have experienced. Every time I search, I don't seem to get exactly what I'm needing, so I figure I'd just ask to see if anyone has an answer or at least point me to the place with the right answer.
The scenario is commonly I'll have an excel workbook that has not been opened yet, typically an export from a BusinessObjects datamart, but not limited to just that source. Anyway, any time I've tried to import the workbook into Access, create a linked server in SQL server, or even use the workbook as an Excel Source in SSIS, the worksheet comes through with no data even though it has data. However, if I were to open the file manually in Excel, save it and close, all of the above show the data as expected. This is a very frustrating problem that I have yet to find a more automated solution to other than having some clunky script open the workbook in an excel instance, save it, then close it again.
Any help is appreciated. Thanks.
Currently we have a Excel VBA application, which consists of 25-30 Excel sheet (and all of those sheets all hidden and we do background processing on them and display it to VBA forms UI), and we have developed a UI using VB forms. But problem we are facing is whenever we click on Save button using this code:
ThisWorkbook.Save
But this saves entire workbook not an individual sheet, so even if we make changes in single sheet it saves entire workbook and this save processing makes very slow (since it needs to save all excel sheet containing lot of data unnecessary, even if there is no changes).
My question is is there any way we can save "only one sheet in a particular excel sheet" not an entire excel file?
Note: I am a Java developer and I worked on VBA before, But it was years back, and I have forgotten bit. Any guidance would be appreciated. Or any pointers on how to handle this situation would be appreciated. Please let me know if you need any more information, I can edit this question.
What I have tried already? I did a lot of research from yesterday, I searched in previous questions on SO, but didn't get any useful information. As per my research it says we cannot do this. Am I on right path?
The short answer is no. You cannot save a single worksheet at a time.
You may want to try to reduce the amount of data in the workbook. Try storing data in several workbooks and when it is needed, open that specific workbook, make the needed changes, and then close it.
If it is necessary to have access to all data at once then consider using access or some other database.
It is also possible that the sheets have "blank data". Cells that don't contain anything in them but excel thinks they do so when saving it tries to save way more than needed.
Assuming that it is the active worksheet that you want to save then you could do something like this:
ActiveSheet.Copy
ActiveWorkbook.Close True, "path"
This copies the active worksheet which creates a new workbook which will become the active workbook. Then just call the close method on that and give it a file name.
I think you should consider splitting your application into multiple workbooks:
The workbook that contains all the logic, user forms and programming code. This workbook handles all other workbooks as well as the displaying of it. Potentially, this could be even an "Application Specific Addin", that stays dormant but activates as soon as any of it's subsequent workbooks gets opened. For this architecture approach check out the section on "Application Specific Addins" in this link.
This workobook/add-in can also hide the other workbooks, so that the user will not notice it's multiple workbooks.
One or multiple data workbooks: Depending how interlinked the data is, you can separate this, e.g. in a "Sales data" workbook which contains the large database, as "Base data" workbook, that contains all the smaller data (e.g. products or stores tables).
This way, you can reduce the saving to the "relevant" sheets. However, of course this requires quite a bit of reprogramming - but it's worth the effort, as for instance it also allows to provide updates/bug fixes without having the transfer the data between versions, as you only need to distribute the the file with programming logic. :-)