English 中文(简体)
在纽特州,从正常的外壳工作书(xlsx)中点击 Tri外部宏观
原标题:Triggering external macro on button click from normal excel workbook (.xlsx)
  • 时间:2011-05-12 09:30:39
  •  标签:
  • vba
  • excel

Stated simply my question is as follows Is it possible for a button on a worksheet in a normal excel workbook (.xlsx not .xlsm) to trigger a macro in another file specifically an installed excel add in (.xlam).

在这方面,我为什么要做到这一点。 我有一本工作手册,许多用户需要能够看到,但只有一些用户需要能够更新,填写在另一张表格上,并用一个宏观添加。 工作单不应包含任何宏观措施,以避免正常用户开启的安全警告。 我可以这样做,在添加一个rib子,即用户点击,然后检查正确的工作手册是开放的,表格是填充的。 在实施更新守则之前。 但是,如果 but子不出现在rib子上,而坐在工作桌上不低于表格,那么接口就会变得nic。 因此,我的问题是,有可能从纽托尼点点击非宏观化工作手册引发外部宏观。

最佳回答

I don t see how you can execute a macro from a control in a non-macro-enabled workbook.

问题回答

是的,你可以将外部宏观(应当xlsm file)转让给非macro-enabled workbook(.xlsx)纽顿。 我的xsm 宏观与简化的xlsx工作书相同的目录。 (说明:我使用Excel 2010)

  1. Firstly, you must open your xlsm macro in the same instance of Excel window (i.e. do not open a new instance of Excel) so that your xlsx workbook will be able to see/access it.
  2. Right-click on your xlsx workbook button and select "Assign Macro..."
  3. Make sure you select Macros in: All Open Workbooks
  4. All macros in open workbooks will be shown (this is why it is important to do step 1).
  5. Select the desired macro from the list then click OK.




相关问题
import of excel in SQL imports NULL lines

I have a stored procedure that imports differently formatted workbooks into a database table, does work on them then drops the table. Here is the populating query. SELECT IDENTITY(INT,1,1) AS ID ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Excel date to Unix timestamp

Does anyone know how to convert an Excel date to a correct Unix timestamp?

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Importing from excel "applications" using SSIS

I am looking for any tips or resources on importing from excel into a SQL database, but specifically when the information is NOT in column and row format. I am currently doing some pre-development ...

热门标签