Microsoft jscript runtime error "object doesn't support this property or method" - jscript

I'm getting a Microsoft jscript runtime error popup with the usual "object doesn't support this property or method" message.
The problem is, I have no idea why this message pops up or what program it belongs to, and I have no idea how I can dig up more information from the popup itself.
It pops up seemingly random. Always a while after startup and about 2-3 more times whether I'm using my computer or not. I get no more feedback when I click "OK" or X it away.
Anyone know how I can figure out what program the popup belongs to?
Edit: It repeats itself a couple of times when either clicking OK or X. Right after clicking, it pops up again, but stops after the 3 times.

Anyone know how I can figure out what program the popup belongs to?
1) Install Sysinternals Process Explorer.
2) As soon as an error dialog box appears do not close it. Use "Find windows's process" tool (see Pic1) by selecting the popup window (dialog box with the error message).
3) Process Explorer will show you the process that generates an error.
If you need to debug the root cause do the following:
4) Install Microsoft Visual Studio Express 2013 for Windows Desktop (free of charge)
5) Start IDE and choose Debug/Attach to Process.
6) Use 'Select...' button to change the type of code. Choose 'Script'.
7) Attach to your faulty process and have fun ;)

Related

Is it possible to get rid of the delete warning sound in Excel?

When I'm dumping data from a failed macro the last thing I want is the stupid system to bleep at me.
I looked in all the options and couldn't find one.
I tried selecting and then unselecting Options>Ease of Access>Feedback Options>Provide feedback with sound (It was already unticked so I ticked and unticked it.
I tried running an On Open event with application warnings equal to false.
None of these things work. If a process stops and displays a warning message you need to click it doesn't need a sound to accompany it.
I know I could switch the sound off but what if I want to listen to music or a podcast?
it's extremely irritating and I'm dumbfounded that it's easier to jump out of a window than disable a totally un-necessary source of irritation.
So you've tagged this question Excel and VBA, but Options > Ease of Access > Feedback Options > Provide feedback with sound does not exist in the Visual Basic Editor (VBE). Not sure where you're getting that from.
Anyway, the easiest way to achieve this is hitting Alt+F11 and then going to Tools > Options in the in the VBE and then unticking "Auto Syntax Check".
Faulty code will still be marked in red (or whatever color you've chosen on the Editor Format tab), but the pop-up error message will not be shown and the annoying system beep will no longer be played.
It should be noted that this will NOT prevent run-time error beeps, only syntax error beeps during coding in the VBE. I suppose you could write a Windows API call to the winmm.dll file which plays system sounds, if you also want to get rid of the system sound accompanying run-time errors.

Excel automation: PDF export causes "Printer setup" popup

I am developing an application for automatic Excel to PDF generation. Every now and then (and without any apparent cause, the following popup comes up while the program runs:
Print driver host for 32bit applications stopped working.
and, shortly after, this one:
Printer setup
What, if anything, do I need to do here? My application is not overly complex. The error always (100%) happens on this line:
_application.ActiveWorkbook.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF,
pdfTemplatePath, Excel.XlFixedFormatQuality.xlQualityStandard,
_, _, 1, pdfPrintAreaEnd);
where the variables in question are:
Excel := Microsoft.Office.Intertop.Excel
_application := Excel.Application
_ := System.Type.Missing
pdfPrintAreaEnd := int 6
The exception message is as follows:
System.Runtime.InteropServices.COMException (0x800A03EC):
Exception from HRESULT: 0x800A03EC
What is happening here? And, more importantly: Why is it only happening every one in a while?
Okay, so after some research into this matter, I encountered what I believe is one of the most confuzzling things about Excel automation I have encountered so far.
The error message is consistent with other cases of Excel usage that are both automated and not. The common denominator in all these cases is (buckle up!) that a network printer was set as default printer.
That's right - having a network printer as default, even when you print using a completely different printer or no printer at all (as in the case of exporting to PDF, which is not the same as printing to e.g. Adobe PDF Printer, right?) it will cause this error to sometimes on some machines pop up.
I changed the default printer to something internal, like Microsoft XPS Document Printer, tried again and I can now export hundreds and thousands of PDFs without a single occurrence of the error message.
I had a similar issue on my work laptop. The printer setup would pop-up when trying to execute ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:="\directory\MyFile".
The network printer was set as default. So I navigated to the printer in windows explorer. This prompted me to enter my network password. When I re-ran the code it worked splendidly.(You can find the location of the printer in Windows 10 by typing 'printer' in the windows search bar. Click on Printers And Scanners, navigate to your network printer and then click on manage -> Select Hardware Properties. The location will be displayed next to the image of the printer. In my case the printers location was specified in its name).
In summary, ensure you have access to the default printer. A simple test is trying to print something with your default printer.
If you don't mind changing your default printer follow #F.P solution above.
Someties it,s needed to close your workbook and reopen it.
In my case, when I opened an excel file, it prompted me to click the "Enable Editing" button in the picture below:
When I clicked on it, the excel file wants to open again and Excel splash screen shown again and I closed it immediately. And then I was not to able to save as a PDF both with "Print" button and "VB" code.

Visual C++ Debugging Error - wuser32.pdb not loaded

I have made a form (GUI) in Visual C++ & while debugging it step by step, I got the following error, which stopped further debugging of the code.
The screenshot of the error is shown below.
How to solve this?
Good chance further debugging is in fact not stopped - seems you tried to step into a system function (implemented in wuser32.dll), and you can't debug this without matching symbols. You can post a screenshot of the stack window at this point to help us verify.
First, try to just continue (F5 or Shift+F11 to step out).
If for some reason you must view at least function names at this location - check the 'microsoft symbol server' at the screen you show. and click load. After a brief download pause, you should be able to see at least a disassembly window, and hopefully a meaningful name for the current stack frame.

Visual Basic and MS Excel

I am working with visual basic to run macro operation in MS Excel.
On running the application sometime it crashes or terminates due wrong input given or other reasons. Now it shows a dialog to asking to Continue, Debug, End or Help.
So i Need to disable Debug option from that or it just terminates showing error as on selecting debug will take user in Microsoft Visual Basic for Applications.
The debug option in my opinion is from MS Excel as after selection on End option it shows my application Error Handler.
please share your experiences and suggestion to disable this DEBUG option while application is running.
Thanks in advance.
Ideally, you'll want to handle all of your errors via the code itself; meaning that if your code throws an error or has received an improper input, the program will display a customized error notifying the user of the issue, or ignore the error. Simple example:
Sub ErrorHandling()
On Error GoTo DisplayMessage:
x = 0
y = 5 / x
GoTo TheEnd:
DisplayMessage:
MsgBox "Your x value cannot be 0"
TheEnd:
End Sub
The code will throw an error because you can't do 5 / 0, but the error will be handled by going to the DisplayMessage: part of the code. However, if you really do need to disable the "Debug" button, you can do the following:
Open up the VBA Editor
Right-Click on the name of your project (if you haven't changed it, it should be "VBAProject")
Select "VBAProject Properties" (Where VBAProject is the name of your
vba project)
Select the Protection tab and then check "Lock for project viewing".
Enter a password. This password will now be required if you want to open the VBA Editor make further edits to the vba code
Save and close your workbook
Now the next time you open the workbook and an error occurs, the debug button will be disabled.

LINK : fatal error LNK1104: cannot open .exe

My question is not a duplicate of this, in fact its a extension of the same question,
This is the code snippet, due to which the error occurs,
BOOL CMyApp::InitInstance() {
m_pMainWnd = new CMainWindow;
m_pMainWnd->ShowWindow(SW_NORMAL);
m_pMainWnd->UpdateWindow();
return TRUE;
}
So, when I use m_pMainWnd->ShowWindow(SW_NORMAL); the prgoram runs without any error, the window opens in normal size and I can see the output, but when I do m_pMainWnd->ShowWindow(SW_MAX); even after the program runs without errors I cannot see the output window, also when I try to rebuild, VC throws an error saying
LINK : fatal error LNK1104: cannot open .exe
I have followed a few answers of this question as well, the first answer in this question suggests
You might have not closed the the output. Close the output, clean and rebuild the file. You might be able to run the file now.
which is quite correct but what I have to do is log off my computer and log in again in order to terminate the output process, I have to do this because I can neither find an application window that is open, nor I can see any program running in the Application's tab in 'Task Manager'. I even followed the second answer which says
You have to put Application Experience on Manual startup(you can do it by searching services in windows 7 start menu, and then find Application Experience and click properties).
except when I got there, I found the Application was already put on Manual Startup, and the problem still persists. Along with the solution what I want to know is why does the program not show output when I write m_pMainWnd->ShowWindow(SW_MAX);
If it helps I am using VC++ 6.0 and my OS is Windows-7 Professional 32-bit
SW_MAX is same as SW_FORCEMINIMIZE the documentation states that
Minimizes a window, even if the thread that owns the window is not
responding. This flag should only be used when minimizing windows from
a different thread.
It infact minimize the window and the application still run's in the task bar. I checked it in Win7 machine.
if your objective is to display the window in maximized state use SW_SHOWMAXIMIZED instead.
The VC++ 6.0 debugger does not work correctly under Windows 7 due to changes.
When you attempt to kill the process from the debugger, the process doesn't end correctly and gets stuck.
See the following topic for more info.
How to debug with Visual C++ 6 on Windows 7 x64?

Resources