以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]这个条件表达式为什么是错误的 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=141845) |
-- 作者:dzy1232016 -- 发布时间:2019/10/12 12:00:00 -- [求助]这个条件表达式为什么是错误的 Dim dlg As New SaveFileDialog \'定义一个新的SaveFileDialog dlg.Filter= "Excel文件|*.xls" \'设置筛选器 Tables("hkcj").Sort="班级" If Tables("hkcj").Filter="[班级]>=\'25\' and [班级]<=\'31\' and [是否招办]=True" Then Tables("hkcj").SaveExcel("D:\\招办.xls", "Sheet1") \'保存文件 End If If Tables("hkcj").Filter="[班级]>=\'25\' and [班级]<=\'31\' and [是否招办]=False" Then Tables("hkcj").SaveExcel("D:\\本校.xls", "Sheet1") \'保存文件 End If 我的“是否招办”是逻辑型主要就这个错误,不加它就正确,该如何写
|
-- 作者:有点蓝 -- 发布时间:2019/10/12 13:36:00 -- 逻辑列就这样用,不会有问题的。提示什么错误? |
-- 作者:dzy1232016 -- 发布时间:2019/10/12 14:01:00 -- 没提示也不导出 |
-- 作者:有点蓝 -- 发布时间:2019/10/12 14:03:00 -- 这样用 Tables("hkcj").Sort="班级" Tables("hkcj").Filter="[班级]>=\'25\' and [班级]<=\'31\' and [是否招办]=True" Tables("hkcj").SaveExcel("D:\\招办.xls", "Sheet1") \'保存文件 Tables("hkcj").Filter="[班级]>=\'25\' and [班级]<=\'31\' and [是否招办]=False" Tables("hkcj").SaveExcel("D:\\本校.xls", "Sheet1") \'保存文件 |
-- 作者:dzy1232016 -- 发布时间:2019/10/12 14:51:00 -- 谢谢解决问题了 |