Can’t find Library or Project Excel VBa - vba

I’ve run into an issue with a couple of workbooks where the message “Can’t find library or project.”. However, when I open the VBA window to check the references, it’s non responsive (as in I can click things, but no menus appear, the project window displays the desktop, and Active X controls are non responsive).
I’m in Excel 2013. Is it possible that if the file was created in 2010 and brought over there could be issues? I’m acratching my head as this seems to happen completly at random.

Thanks guys. I managed to open the file in Safe Mode, and tried compiling the code. I believe that there was an error in the Workbook Open code that it may have been corrupting on. I deleted this, and it seems to be all good

Related

Excel ActiveX controls changing size with resolution still not fixed?

OK, this might be a bit of a generic and repeated non-code question but the latest article I can find about this is from over 2 years ago, so I'm wondering if there's been a fix or an update or maybe some clever dude out there has cracked the secret to curing this.
Every time I extend my screen while Excel (2007, 2010 or 2013) is running, and every time I unplug from an extension while Excel is running, my ActiveX controls are rendered useless, because with each click they either shrink or get bigger, depending on if I extended or unplugged.
This happens until I close the Excel application and restart it, unfortunately if I've saved it while the buttons are bigger/smaller they might end up stuck like that.
There is a thread here which has a bit code to help deal with the issue but quite frankly I'm hoping by now, two years later, someone has a slightly more efficient method of dealing with it.
I've took to using hyperlinks to run macros now but that's no good for my drop-boxes and things. And for me personally, I can just make sure I close Excel before extending/unplugging, but the real issue is I'm developing apps for people around the company and it's starting to cause problems with these damned buttons.
Does anyone know of a definitive fix for this yet?
If you only need ActiveX buttons to run macros, use Shapes instead. You can assign macros to a s shape's Click event. Right-click the shape and select "Assign Macro".

Error : Unable to open module file System Error &H80070002&

I am working on a web based dynamic vb form which is of around 20,000 lines suddenly my system got shutdown due to power loss, When I reopened the system then I found my .vb file is only left with Hexadecimal-Binary kind of text as in the screen shot.
When I am running the code in Visual Studio it is running fine and show the form in web browser but I need to edit it as I am in development phase.
On opening the file in notepad it is showing blank page with lots of blank lines.
I have tried to recover using 'restoring previous versions' but I found 'There are no previous versions available'.
I also have tried to recover using 'Open system restore' in which I found a list of restore point but even after successful completion issue is remain same.
Error screen shot
I didn't any solution for this problem.
I have some my code in distributed manner so I merge those pieces of code and wrote rest of the code.
If any body knows better solution than this, please share it.

Automation Error / Catastrophic Failure when debugging VSTO project

I'm building a document-level VSTO customization for an Excel 2016 workbook, and I'm encountering this error repeatedly in the development process. Basically, Visual Studio 2015 builds the project, Excel loads the workbook, and immediately Excel displays an "Automation Error / Catastrophic Failure" message. It kicks me into the VBA editor, but there's no code on the screen to edit.
I read in a few places that the error means there is something wrong with the "References" settings in the VBE, but it won't let me open that screen, the option is grayed out. Anything else I try to do just pulls that error up again. The only way out is to stop the process through Visual Studio. If I open the source workbook directly from the project folder, the same problem occurs, and I have to quit Excel via Task Manager.
This problem has been coming and going over the past 24 hours; last night and this morning it wasn't happening for some reason, so I was having no issues running and testing my project, but now the problem is back. If anyone has an idea of what could be causing this problem (bearing in mind it must be something that has not been constant over the past day), I'm all ears. Even just an idea of what to look for would be helpful, as I don't even know what this error means or what kinds of things to look for. This is my first VSTO project and I've been pretty excited by what I was able to accomplish when this error wasn't coming up every time, so I'd like to eliminate the problem permanently.
Edit: I should point out that the reason I included VSTO in the question title is that this workbook was totally fine before I started the VSTO project. But I saw this error when I tried to run the VSTO project for the first time, yesterday.
So, I think I "kinda-sorta" figured out my own problem. I'm still not 100% sure what caused it in the first place, but I'll leave this here for anyone else who runs into the same issue someday:
When you get this error, don't despair like I did because the VBE window has no code highlighted as the problem area. Look through ALL the VBA code in every object/module/sheet; in my case, I eventually found a function highlighted as the cause of the problem. I was able to bypass the error temporarily by turning off automatic calculations, and I commented out the offending function. It broke some things in my workbook to do so, but it gave me the opportunity to debug my VB.net code in Visual Studio, and when I uncommented the "problem" VBA function after doing so, it all worked perfectly fine.

Issues when upgrading from Excel 2010 to 2013

I've been working on a dashboard for the past several months in Excel 2010 and was nearing completion when we were upgraded to Excel 2013. I have experienced one issue that I'm completely stumped on...
I built a simple UI for the dashboard utilizing the first several rows of each sheet. Essentially, each sub-menu is hidden in a different row and only the appropriate rows are visible at any time. Is also allows the user to toggle on/off the various menus in/out of view without using a userform.
Prior to upgrading to 2013, it was very snappy and responsive, taking around 0.05 seconds each time a change was made in the UI. However, after migrating to Excel 2013 the UI is very sluggish. At first I thought it was a screenupdating issue because the screen was updating in bits and pieces - the labels, hidden rows, background color, etc would come in chunks, instead of all at once. I've ruled that out as a possibility.
I also tried disabling all of the annoying new animations that are baked into 2013. I tried all of the different methods I saw out there online - disabling the hardware graphics acceleration, turning off unnecessary animations in the ease of access center, etc. That too seems to have no effect.
After a full day of troubleshooting, I've noticed a sheet with just the UI and nothing else runs just as snappy as before. It's only when there are objects on the worksheet that things go wrong. From what I can tell, shapes and text boxes seem to have no effect on performance. Labels, both form control and Active X, seem to be the culprit.
I've noticed that the little bits of code I have for the UI continue to run at the same speed, but the screen will continue to change even after the procedure has run. This also totally perplexes me. I have tried changing the property from Move and Size with Cell to Free Floating and neither seems to make any difference. I've also tried changing things like Print Object, Locked, etc.
I'm totally stumped as to how to resolve this issue. It's definitely something endemic to 2013 as the exact same file runs without issue on 2010. If anyone has any suggestions they would be greatly appreciated.
UPDATE: Here is a link to a sample file highlighting the issue. Both work fine when tested on 2010.
https://www.dropbox.com/s/r2ep5bgyn6ohjph/2013%20Issue.xlsm?dl=0
Granted this is a stretch, but a little bit of research tells me that Excel 2013 has suffered a number of problems with ActiveX controls. There were several patches Microsoft has released, so I recommend you install them first and make sure your copy of Excel 2013 is completely up to date.
https://support.microsoft.com/en-us/kb/3025036
https://support.microsoft.com/en-us/kb/2956145
If this does not fix the problem, please let me know and I will remove this answer.
All, thanks for your help. I finally solved the issue I was having. I isolated the problem to Form Controls or ActiveX controls being visible at the time the code is run. I'm not sure why but the presence of either creates an issue. However, hiding all shapes prior to running the code and then unhiding them after resolves the issue. I did notice, however, this solution only works if the code does NOT turn screenupdating off prior to execution. I will post an updated file later when I have access to dropbox.

MS Office PowerPoint VBA Programming support or Debug Mode?

I am trying to develop a little macro for PowerPoint using VBA. However, the "Development Environment" is an absolute nightmare!
The worst: there seems to be no real good way to generate debug output! I read that the Debug.Print output is supposed to go to the Immediate Window, but nothing appears there! So I am currently using MsgBox to generate debug messages. :-(
What's also really bad is, that errors in a macro always crash PPT. So one has to wait, until it is gone and then one has to restart it again and get rid of all the Recovery attempts. This always takes ages!
If I set On Error Resume Next it doesn't crash - at least not as often - but then things just silently don't work and I can't see what and why things go wrong (unless I plaster the code with MsgBox calls, but that requires 100'000 clicks during each execution).
And running the code in the debugger and single stepping trough the code doesn't work, either, since my macro refers to the current "ActivePresentation" and that doesn't seem to exist unless one starts the slideshow mode. So this debugging is driving me nuts!
Is this really the only possibility or environment to develop VBA code in? At least some idea re. debug output, anyone?
M.
The worst: there seems to be no real good way to generate debug output! I read that the Debug.Print output is supposed to go to the Immediate Window, but nothing appears there!
At the risk of sounding insulting (which I don't intend!) do you have the Immediate window open? While in the IDE, press Ctrl+G to see if anything new appears. If so, that's the Immediate window.
What's also really bad is, that errors in a macro always crash PPT.
Not ordinarily, no. It can happen that way, of course; your code might be triggering a bug in PPT. Heaven knows, I ran into enough of that in PPT 2002 and 2007. If you're using reasonable error handling and still running into errors that crash PPT, stepping through the code as it runs should allow you at least to narrow it down to the line or two that cause the crash.
And running the code in the debugger and single stepping trough the code doesn't work, either, since my macro refers to the current "ActivePresentation" and that doesn't seem to exist unless one starts the slideshow mode.
Again, no. The ActivePresentation refers to whatever presentation has focus in the app, whether it's in slide show or any other view. If your code's in one presentation and its' supposed to be acting on another, that can cause some confusion, but you simply need to switch to normal view, make sure the presentation you want to access is visible (I'd make sure not to have several in view) then Alt+F11 to return to the IDE and run your code.
All of these suggestions apply to any Windows version of PPT, going back to Office 97 (Mac? Thinks different. If you're using a Mac, mention that. There are a few differences but for the most part, everything above applies except for the Alt+F11).
If none of this seems to help on your setup, it may be time to do a repair of Office.