Private Sub CommandButton1_Click()
'Variables
Dim Fn As String
Dim ColumnCT As String
Dim StringArray As String
Fn = FreeFile()
Open TextBox1.Text For Input As Fn
Sheet1.UsedRange.Clear
'Making Column Titles
Dim Il As Integer
Dim Loc As Integer
Dim Leng As Integer
Dim ColmnTtl As String
Il = 0
While Il < 50
Il = Il + 1
Loc = InStr(Fn, ",")
Loc -Il = Leng
ColmnTit = Mid(Fn, Loc, Leng)
Wend
Sheets("sheet1").Range("H1").Value = ColmnTtl
'Figuring out the data acquiring
Dim Ic As Integer
Ic = -1
Do Until Ic = 100
Ic = Ic + 1
If IsOdd(Ic) Then
'INSERT EQUATION TO PULL OUT THE DATA FROM EVERY OTHER STRING
End If
Loop
Ic = Ic + 1
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
Dim vaFiles As Variant 'Open up browser for Txt File
vaFiles = Application.GetOpenFilename _
(FileFilter:="Text File (*.txt),*.txt", _
Title:="Open File(s)", MultiSelect:=False)
TextBox1.Text = vaFiles 'Display file location in txt box
End Sub
Private Sub UserForm_Activate()
Dim FSO As Object
Dim oApp As Object
Dim Fname As Variant
Dim FileNameFolder As Variant
Dim DefPath As String
Dim DP As Variant
Fname = Application.GetOpenFilename(FileFilter:="Zip Files (*.zip), *.zip", MultiSelect:=False)
If Fname = False Then
'Do nothing
Else
'Destination folder
DefPath = "C:\Lab\Test\"
If Right(DefPath, 1) <> "\" Then
DefPath = DefPath & "\"
End If
FileNameFolder = DefPath
DP = DefPath
'Extract the files into the Destination folder
Set oApp = CreateObject("Shell.Application")
oApp.Namespace(FileNameFolder).CopyHere oApp.Namespace(Fname).items
MsgBox "You find the files here: " & FileNameFolder
On Error Resume Next
Set FSO = CreateObject("scripting.filesystemobject")
FSO.deletefolder Environ("Temp") & "\Temporary Directory*", True
End If
End Sub