vba - Excel VBA MultiPage - 获取页数

标签 vba excel

我在 Excel VBA 2010 中创建了一个多页表单。 如何获取该多页中的页数?

谢谢, 勒索

最佳答案

试试这个:

Dim mulpage as Control, pge as Page, counter as Integer
For Each mulPage In Me.Controls
       If TypeName(mulPage) = "MultiPage" Then
           For Each pge In mulPage.Pages
               counter = counter + 1
           Next pge
       End If
Next

My code is in 2003. So for you, you need to reference the Form Page property explicitly using Dim pge As msforms.Page instead of Dim pge As Page for 2007, 2010...going forward.

引用文献:

关于vba - Excel VBA MultiPage - 获取页数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14693271/

相关文章:

java - 如何将 PDF 转换为 JSON/EXCEL/WORD 文件?

excel - 如何在不等于的单元格中计算 3*2*5+6

vba - 连接备用列

excel - 动态范围设置

excel - 将一个大的 xls 文件读入 R

VB.NET - 以编程方式检查 Excel 中是否存在工作表

excel - 获取不在办公室的文本

excel - 使用 VBA 修改动态名称

vba - 从 VBA Excel 宏函数获取 VBscript 中的值

ruby-on-rails - 如何格式化 Axlsx 中的货币列?