activexobject

How to copy an ActiveX control over to another sheet preventing the name change of the control

六月ゝ 毕业季﹏ 提交于 2019-12-01 05:35:57
问题 I am using the code below to copy a command button from one sheet and paste it into another: Sheets("SRC").HasACustomName.Copy Sheets("TRGT").Range("O1").PasteSpecial When I paste it, it get's renamed from HasACustomName to CommandButton1 . Can I either copy/paste it in a way that retains the name or change the name after pasting? 回答1: ActiveX You can copy an ActiveX Control from one sheet to another with the below code. Note: you cannot have two objects of the same name on one spreadsheet.

How to get a IHTMLElement pointer to the <object> tag hosting an activex control

牧云@^-^@ 提交于 2019-12-01 05:34:35
问题 I have an ActiveX control generated by the FireBreath framework (http://firebreath.org). I need to get a reference to the <object> tag in the page that hosts the plugin from C++. If I were using NPAPI, I would use the NPNVPluginElementNPObject constant with NPN_GetValue. so to make sure I am being clear, say I have the following in the page: <object id="testPlugin" type="application/x-someplugin" width="100%" height="100%"></object> I want to get a reference to the plugin like I would if I

Can I compile VBA on workbook open?

青春壹個敷衍的年華 提交于 2019-11-30 03:29:42
问题 I am trying to find a way of compiling the code in VBA on workbook open. I can do this manually by opening the VBA environment, going into Debug and "Compile VBAProject" but was wondering if there is a way to do this through the code every time the workbook opens. The purpose of this is to load the code into the computers memory to prevent a compile error due to use of some Active X Objects. As mentioned, I can do this manually and it solves the problem however, as there are many users that

Excel 2010 ActiveX Controls No Longer Working After Windows Updates [duplicate]

前提是你 提交于 2019-11-29 19:58:08
问题 This question already has an answer here: Microsoft Excel ActiveX Controls Disabled? 11 answers So at work I ran into this issue after I installed the most recent Windows 7 updates (including Microsoft Office 2010 updates) - the date up the update was today (Dec 12, 2014). After the update, I opened my macro enabled workbook in Excel 2010 and basically anything that referenced ActiveX controls (checkboxes, buttons) no longer worked. My auto_open was checking checkboxes and couldn't run... it

Read file names in a local folder in an HTML page

天大地大妈咪最大 提交于 2019-11-28 13:07:11
I am creating a HTML page where I need to display the names of the files present in the specific local folder, example - C:\Users\User1\Documents\folder1 . I tried to write the code in java script but have not succeeded yet. Most of the question threads mention about "ActiveXObject" to be used but that itself does not work for me. Reference: JavaScript: Read files in folder Can anyone help me in achieving this? duskwuff In general, you can't do that. Web pages do not have access to the local filesystem. Chrome can access the contents of a directory that is selected using a file input field.

ASP.NET Cannot create ActiveX component

旧城冷巷雨未停 提交于 2019-11-28 12:28:15
I have a ASP.NET application that allows users to export their staff's absences each month to Microsoft Excel. The application is currently generating the following exception Exception: Cannot create ActiveX component. with the following stack trace System.Exception: Cannot create ActiveX component. at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName) at HR.ManagerSummary.ExportToExcel() in H:\Development\pagec\Visual Studio 2005\Projects\HR\ysnet2\Time\ManagerSummary.aspx.vb:line 935 at HR.ManagerSummary.btnExcel_Click(Object sender, EventArgs e) in H:

ActiveX event handlers in an HTA using Javascript

你。 提交于 2019-11-28 11:50:52
In C# I can write event handlers as follows: var wdApp = new Microsoft.Office.Interop.Word.Application(); wdApp.DocumentBeforeSave += (Document doc, ref bool saveAsUI, ref bool cancel) => { //do stuff here }; In VBA/VB6, I can use static event handling: Dim WithEvents wdApp As Word.Application Private Sub wdApp_DocumentBeforeSave(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean) 'do stuff here End Sub I would prefer to use dynamic event handling. However, in Javascript, even when using static event handling with the syntax described here : var wdApp = new ActiveXObject('Word

Create COM/ActiveXObject in C#, use from JScript, with simple event

若如初见. 提交于 2019-11-28 10:06:19
I'd like to create a COM object in C#, and use it via IDispatch from JScript. That part is pretty simple. I also want to implement simple callbacks on the COM object, similar to the event exposed by the XmlHttpRequest object that is usable in a browser. That model allows Javascript to attach event handlers like this: var xmlhttp = new ActiveXObject("MSXML.XMLHTTP"); xmlhttp.onReadyStateChange = function() { ... }; I want my client-side JScript code to look like this: var myObject = new ActiveXObject("MyObject.ProgId"); myObject.onMyCustomEvent = function(..args here..) { ... }; What does the C

How to close a HTA window from another HTA?

杀马特。学长 韩版系。学妹 提交于 2019-11-28 02:17:37
I've tried to implement my own modal dialogs ( Why? ). I open a new window using WScript.Shell : dlg = shell.Run(dlgPath, 1, true); The line above creates a "semi-modal" HTA window. The script execution is stopped at this line, but the main window is still responsive. This issue is tackled within onfocusin eventhandler, which returns focus back to the new HTA window using shell.AppActivate() . This prevents even "Close Window" button to close the main window. However, in Windows7 there's a back gate to close the main window, the icon in Windows Task Bar. If the main window is closed, a decent

javascript XMLHttpRequest open php file and execute more javascript

夙愿已清 提交于 2019-11-27 08:40:52
问题 I have a main page, call it Main.php. On this page, is a button that when clicked, sets a div's innerHTML (already on Main.php, called divResults) with the results from Results.php. When Results.php is called, the returned HTML "These Are The Results" is properly received and set as the contents to divResults on Main.php. However, any javascript from Results.php is not executed. As an example, I attempt to do a simple window.alert. Here is example code: Main.php link button to begin the