PDA

View Full Version : Upload test



mdmackillop
03-31-2008, 09:32 AM
Testing

mdmackillop
04-25-2010, 11:37 AM
test

mdmackillop
05-29-2010, 02:54 AM
Sub SplitText()
Dim tName As String
Dim fName As String
Const ForReading = 1, ForWriting = 2, ForAppending = 3
pth = ActiveWorkbook.Path & "\"
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(pth & "sample.txt", ForReading, TristateFalse)
txt = f.readall
f.Close
Set f = Nothing
Set fs = Nothing

a = Split(txt, "<BTAG>")
For i = 1 To UBound(a)
fName = Trim(Split(a(i), "<")(0)) & ".txt"
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.CreateTextFile(pth & fName, True)
f.write "<BTAG> " & a(i)
f.Close
Next

End Sub

mdmackillop
06-06-2010, 03:32 AM
email

mdmackillop
10-21-2010, 10:49 AM
Sub Macro1()
Dim t As Variant
Dim c
As Range
Set c = Range("A2")
t =
Split(c, Chr(10))
c.Resize(UBound(t)) =
Application.Transpose(t)
End Sub