Foxtable(狐表)用户栏目专家坐堂 → 我想做个按钮,可以再代码前面添加 单引号的。可以么?


  共有4892人关注过本帖树形打印复制链接

主题:我想做个按钮,可以再代码前面添加 单引号的。可以么?

帅哥哟,离线,有人找我吗?
jinzhengbe
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:五尾狐 帖子:1062 积分:9781 威望:0 精华:0 注册:2012/3/13 5:23:00
我想做个按钮,可以再代码前面添加 单引号的。可以么?  发帖心情 Post By:2014/7/1 2:10:00 [只看该作者]

我想做个按钮,可以再代码前面添加 单引号的。可以么?

 

假设窗口有个 checkbox 如果按钮被选中 则下面这段代码有效

 

Dim Cols1() As String = {"costPrice","color","weight","length","eng_name","pic","cn_name","width","gongxiang","isCheck","mu","lei","addtime","ccc"}
Dim Cols2() As String = {"costPrice","color","weight","length","eng_name","pic","cn_name","width","gongxiang","isCheck","mu","lei","addtime","ccc"}
Dim Cols3() As String = {"costPrice","color","weight","length","eng_name","pic","cn_name","width","gongxiang","isCheck","mu","lei","addtime","ccc"}
Dim Cols4() As String = {"costPrice","color","weight","length","eng_name","pic","cn_name","width","gongxiang","isCheck","mu","lei","addtime","ccc"}

反之

‘Dim Cols1() As String = {"costPrice","color","weight","length","eng_name","pic","cn_name","width","gongxiang","isCheck","mu","lei","addtime","ccc"}
  'Dim Cols2() As String = {"costPrice","color","weight","length","eng_name","pic","cn_name","width","gongxiang","isCheck","mu","lei","addtime","ccc"}
‘Dim Cols3() As String = {"costPrice","color","weight","length","eng_name","pic","cn_name","width","gongxiang","isCheck","mu","lei","addtime","ccc"}’
‘Dim Cols4() As String = {"costPrice","color","weight","length","eng_name","pic","cn_name","width","gongxiang","isCheck","mu","lei","addtime","ccc"}

 

可以实现么?


 回到顶部
帅哥哟,离线,有人找我吗?
Bin
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2014/7/1 8:37:00 [只看该作者]

if e.form.contols("checkbox1").Checked then
     代码1  '选中时执行
else
    代码2    '不选中时执行
end if


 回到顶部