识别Excel VBA中的换行符 [英] Indentify line breaks in excel VBA
本文介绍了识别Excel VBA中的换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试确定具有换行符的单元格(不是菜单栏单元格选项,通过alt + enter实际多行),并分离地提取每一行
I'm trying to identify a cell has line breaks(not the menu bar cell option, actual multiple lines through alt+enter), and extract each line separatedely
我都尝试过
InStr(str, "\n") < 0
和
Split(str, "\n")
但是似乎没有用
推荐答案
VBA不是C#("\ n"
).您可以在以下代码中找到换行符: vbCr
或 vbLf
或 vbCrLf
常量.
VBA is not C# ("\n"
). Line breaks you'll find on: vbCr
or vbLf
or vbCrLf
constants.
For further information, please see:
vbCr
vbLf
vbCrLf
指向Mat的杯子答案!我忘记了 vbNewLine
常量.
Points to Mat's Mug answer! I forgot about vbNewLine
constant.
这篇关于识别Excel VBA中的换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文