สอบถาม Code หน่อยครับ [VBA]
Posted: Mon Aug 10, 2015 4:27 pm
ผมลองเปลี่ยนตรง IntFNumber หลายแบบแล้วครับยังติด Error อยู่
http://upic.me/show/56426848
http://upic.me/show/56426848
Code: Select all
Sub Break_String()
Dim WrdArray() As String
Dim text_string As String
Dim sSerial As String
Dim sPropoties As String
Dim intFNumber As Integer
Dim FilePath As String
FilePath = "C:\Users\570208\Desktop\788.xltm"
row_number = 0
Open FilePath For Input As #1
Do While Not EOF(1)
text_string = Range("C" & intFNumber).Value
WrdArray() = Split(text_string, ";")
sSerial = Range("B" & intFNumber).Value
For i = LBound(WrdArray) To UBound(WrdArray)
'Write selected data to the worksheet
With Sheet8
.Cells(lRow, 1) = sSerial
.Cells(lRow, 2) = WrdArray(i)
End With
'Address next row of worksheet
lRow = lRow + 1
Next i
'MsgBox strg
Loop
End Sub