永发信息网

在VBA语言中,private和Me!和Nz是什么意思?我新手!!望指教!急!!!!

答案:2  悬赏:40  手机版
解决时间 2021-04-06 09:39
  • 提问者网友:低吟詩仙的傷
  • 2021-04-05 21:26
在VBA语言中,private和Me!和Nz是什么意思?我新手!!望指教!急!!!!
最佳答案
  • 五星知识达人网友:神也偏爱
  • 2021-04-05 22:38
Private 语句
在模块级别中使用,用于声明私有变量及分配存储空间。
语法
Private [WithEvents] varname[([subscripts])] [As [New] type] [,[WithEvents] varname[([subscripts])] [As [New] type]] . . .
说明
Private 变量只能在包含其声明的模块中使用。

Me

Me 关键字像是隐含声明的变量。这个关键字适用于类模块中的每个过程。当类有多个实例时,Me 在代码正在执行的地方提供引用具体实例的方法。要把当前执行类实例的有关信息传递到另一个模块的过程,Me 非常有用。

Nz Function

Description
Use the Nz function to return zero, a zero-length string (" "), or another specified value when a Variant is Null. For example, you can use this function to convert a Null value to another value and prevent it from propagating through an expression.

Syntax
Nz(variant[, valueifnull])

The Nz function uses the following arguments.

Argument
Description

variant
A variable of data type Variant.

valueifnull
Optional. A Variant that supplies a value to be returned if the variant argument is Null. This argument enables you to return aother than zero or a zero-length string.
全部回答
  • 1楼网友:逃夭
  • 2021-04-05 22:58
private是私有函数或变量 me是代替当前模块
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯