以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  在全局代码中声明字典,为什么在表事件和菜单功能区使用字典变量提示错误呢  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=72378)

--  作者:wanlong1215
--  发布时间:2015/7/29 13:29:00
--  在全局代码中声明字典,为什么在表事件和菜单功能区使用字典变量提示错误呢

全局代码声明如下:

Dim dpasstotal As New Dictionary(Of String, Integer)

 

 

代码:

dpasstotal.clear

 

 

错误提示:

编译错误:未声明名称 “dpasstotal”

错误代码 dpasstotal.clear


--  作者:大红袍
--  发布时间:2015/7/29 14:11:00
--  

Dim dpasstotal As New Dictionary(Of String, Integer)

 

改成

 

Public dpasstotal As New Dictionary(Of String, Integer)