将数据从剪贴板传输到阵列 [英] Transfer data from Clipboard to array
本文介绍了将数据从剪贴板传输到阵列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
有没有办法从剪贴板转移到数组。我想将S传递给数组
Is there a way to transfer from clipboard to array. I want to pass S to array
Sub Test()
Sub Test()
Dim DataObj As New MSForms.DataObject
Dim S As String
Dim TheArray As Variant
DataObj.GetFromClipboard
S = DataObj.GetText
Dim DataObj As New MSForms.DataObject
Dim S As String
Dim TheArray As Variant
DataObj.GetFromClipboard
S = DataObj.GetText
结束子
Guy Zommer
Guy Zommer
推荐答案
如何最好地将String转换为数组取决于你的String,你预期它将包含什么,预期的分隔符,是否应该是1D Split函数可能是有用的,也可能是解析
例程的一部分。
How best to convert your String to an array will depend on your String, what you anticipate it will consist of, expected delimiters, whether it should be a 1D or 2D array, etc. The Split function might be helpful, on its own or as part of a parsing routine.
这篇关于将数据从剪贴板传输到阵列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文