Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 Visual Basic 在 excel 2003 中编写一个类似于 java/C# 的类。但是我不知道在哪里写那个类。
这是写作课的例子吗?如果是,我应该把这些放在 excel 2003 哪里?
Type Employee Name As String Address As String Salary As Double End Type
您所拥有的是一个用户定义类型(一种固定的数据结构),您可以将其放置在项目的任何模块中。
要创建一个类模块(我认为这是您正在寻找的),右键单击 VBA 项目 -> 插入 -> 类模块