小编Ner*_*vix的帖子

VBA不需要的循环通过工作表

我已经使用过这个网站,但这是我发布的第一个问题,希望我能提供足够的细节.我找不到任何相关的答案,因为无论我搜索什么,我都会得到与循环代码相关的各种答案.

一些背景:我设计了一个excel文档来跟踪我工作场所中的一些项目(以下简称主文档).由于之前的跟踪器允许用户随时编辑任何内容,因此我使用表单来确保正确输入所有信息并安全存储.对于主文档中的每个项目,都有一个单独的Excel工作簿(以下称为项目文档).

主文档中有许多工作表,每次激活时都会运行代码(因为它们需要更新).

As there is some VBA code in every Item Document which is crucial in syncing data with the Master Document, I have added a Warning worksheet which is shown when the Item Document is opened without macros. This involved using the workbook open, before save and after save events to ensure only the Warning is shown without macros. Here is the code for each event (placed in ThisWorkbook Module obviously)

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel …
Run Code Online (Sandbox Code Playgroud)

excel vba loops excel-vba

5
推荐指数
1
解决办法
833
查看次数

标签 统计

excel ×1

excel-vba ×1

loops ×1

vba ×1