以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]重设显示列后的自动行高 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=151709) |
-- 作者:dqlgood -- 发布时间:2020/7/1 17:15:00 -- [求助]重设显示列后的自动行高 如题: Dim dts() As String = {"第一列","第三列","第四列","第七列"} For Each cl As Col In Tables("表A").Cols If Array.IndexOf(dts, cl.Name) >= 0 Then Tables("表A").Cols(cl.Name).Visible = True Else Tables("表A").Cols(cl.Name).Visible = False End If Next For Each cl As Col In Tables("表A").Cols If Tables("表A").Cols(cl.Name).Visible = True 仅对"表A"显示列的自动行高代码 End If Next |
-- 作者:有点蓝 -- 发布时间:2020/7/1 17:25:00 -- 行高设置是针对行的,无法指定列 |
-- 作者:dqlgood -- 发布时间:2020/7/2 8:22:00 -- 谢谢老师,是我想多了,把问题搞复杂了,重新自动行高即可。 Dim dts() As String = {"第一列","第三列","第四列","第七列"} For Each cl As Col In Tables("表A").Cols If Array.IndexOf(dts, cl.Name) >= 0 Then Tables("表A").Cols(cl.Name).Visible = True Else Tables("表A").Cols(cl.Name).Visible = False End If Next Tables("表A").AutoSizeRows()
|