VBA:更新XLA加载项中的工作表

时间:2017-08-03 18:39:01

标签: vba excel-vba add-in xla excel

我目前正在从网络文件中动态更新+------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | mobuto_inv_sites | 0 | PRIMARY | 1 | siteid | A | 3 | NULL | NULL | | BTREE | | | | mobuto_inv_sites | 1 | _state | 1 | _state | A | 3 | NULL | NULL | | BTREE | | | +------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ 中的Worksheet

我想将此Ws从ActiveWorkbook移到ActiveWorkbook

如果我这样做,如果XLA加载项受密码保护,我是否仍然可以更新它(即更新数据然后保存XLA加载项)?这样的事情会起作用吗?

XLA Add-In

Private Sub updateMyXLASheet(ByVal MyDataArray as Variant) ThisWorkbook.Sheet("myXLADataSheet").Range("myDataArrayGoesHere").Value = MyDataArray Application.DislayAlertes = False ThisWorkbook.Save Application.DislayAlertes = True End Sub ThisWorkbook工作簿)

1 个答案:

答案 0 :(得分:0)

似乎Excel在更新然后将表单保存在受密码保护的XLA加载项上没有问题。