以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]单元格文字排版  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=74793)

--  作者:zcgmxf
--  发布时间:2015/9/19 9:47:00
--  [求助]单元格文字排版
老师,如何将单元格的文字由A....,B.....C.....按照 A B C左对齐自动排成竖排 A....,
                                                                                    B.....
                                                                                    C.....
请指点,谢谢!
[此贴子已经被作者于2015/9/19 9:48:37编辑过]

--  作者:大红袍
--  发布时间:2015/9/19 11:34:00
--  

去编写drawcell事件

 

If e.Col.name = "第二列"
    Dim str As String = ""
    For Each s As String In e.text
        If Asc(s) >= asc("A") AndAlso ASC(s) <= asc("Z") Then
            str &=  chr(10) & s
        Else
            str &= s
        End If
    Next
    e.text = str.trim(chr(10))
End If