I've been using an Excel where a UserForm shows up as the Excel opens.
Now, for a reason it doesn't even show up anymore, it just gives me a run-time error with a code. The weirdest thing is, that there were no changes in the code, it's been working without any problem.
Here is the error:
"Run-time error '-2147467259 (80004005)":
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x1a88 Thread 0x3450 DBC 0x2a5d24b4
Jet'.
Please, help me figure it out.
Thanks in advance!
Related
Does anyone have any idea, why the assignment
ActiveWorkbook.AutoSaveOn = False
inside Auto_Open might SPORADICALLY trigger runtime error 50289? Something about being unable to execute while Project is protected. Reloading the workbook has so far always overcome the problem. Re-running Auto_Open (via F8) does not cure the problem.
This is using Excel365, loading a file from SharePoint (via OneDrive).
Thanks.
I am about to work on an "older" program of a colleague. Testing it, I get an error message in the following line: (Format being marked)
Me.ComboBoxDistribution.AddItem Format(1#, "#,##0.00")
Error message is in german. I give my best translating it:
An object could not be loaded because it is not available on this computer
As if it wasn't enough the next error message is following:
Error while compiling: Project or library not found.
Is the Format Function just included in older Excel Versions? How can I fix this error? Thank you in advance.
I have a data feed connection in excel. I'm trying to refresh a data feed connection using vbscript. Here's how I try to refresh the connection.
Set oWorkbook = oExcel.Workbooks.Open('<excel file name/path>')
oWorkbook.Connections(1).Refresh
The total number of records returned by the data feed(OData) is actually huge and the conection isn't stable. Hence, I often get the error stating that "The connection is closed" while trying to refresh the connection from excel manually. A snapshot of the error below. Whenever I get this error, I try refreshing the connection again and this results in successful refresh most of the times.
I want to achieve the same result in vbscript as well. When I refresh the connection using vbscript, I get the same error and my script stops running as its unable to capture and handle the error.
In the documentaion I see that I can capture errors only if its OLEDBError or ODBCError. I'm not able to find the similar ways to capture DataFeedConnection error. Is there any way to capture the DataFeedConnection errors?
Edit: To update you with more information on the vbscript, the script picks up multiple files from the current folder, refresh the first or second connection depends on the file name and then compare certain values before and after refresh to make sure the refresh has happened successfully and then decide saving or closing the file based on the comparison results. The reason for comparison is there are some times refresh brings only partial data.
How about the following, adding an "On Error GoTo" then using a msgbox to display the error description:
Sub Foo()
On Error GoTo WhatHappened
'Your code here
WhatHappened:
MsgBox Err.Description
End Sub
This is my code to clear the excel file I have opened.
% get running excel file
Excel = actxGetRunningServer('Excel.Application');
ExcelFile = Excel.get('Workbooks','usbTC0832.xls');
ExcelSheet = ExcelFile.Sheets.Item('Sheet1');
ExcelFile.Worksheets.Item('Sheet1').Range('A2:C520').ClearContents
% ExcelFile.Save;
Pretty straightforward and it works perfectly in another system. In my new system however it throws up the error
>>Error using COM.Excel_Application/get
>>Invoke Error, Dispatch Exception: Invalid index.
It works fine the first time right after I restart my system. Every instance afterwords it throws up that error. I've tried restarting matlab but it doesn't go away. I seem to need to restart my system. I can't understand what the problem is. Any help would be appreciated.
It may be that the get on Workbooks tries to open the file.
But if it is already open, it will raise an error.
Try to look for it first, with Excel.Workbooks.Item('usbTC0832.xls').
That also could give an error if it is NOT open, you should capture it and if not open, use the get.
I am seeing an Error 438 in an application which has until this point been run successfully without error for more than 2 years. Debug shows that it fails on a fairly inoccuous line:
With gVarWorkSheet.ListView1
The workbook has not changed since previous successful runs. Is there anything in the installation of Excel or on the Windows XP PC in general that could have changed that would cause this?