'Option Explicit Sub Auto_Open()
Workbooks.Add Load UserForm1 UserForm1.Show End Sub Public Sub loadForm() Load UserForm1 UserForm1.Show End Sub Sub AlarmHistoryParser() Dim filename As String Dim t As String, c1 As String, s As String, r As String, b As String, d1 As String, e1 As String, f1 As String, g1 As String, h1 As String, i1 As String, j1 As String, k1 As String, l1 As String, m1 As String, n1 As String, o1 As String, p1 As String, q1 As String, r1 As String, s1 As String Dim x As Long, y As Integer, i As Integer, j As Integer ActiveWorkbook.Sheets.Add 'Sheets.Add filename = Application.GetOpenFilename("Text Files (*.txt), *.txt,All Files (*.*),*.*", , "Log Filename") If filename = "" Or filename = "False" Then End Cells.Select Selection.NumberFormat = "@" For i = 1 To Len(filename) If Mid(filename, i, 1) = "\" Then y = i Next i t = Mid(filename, y + 1, Len(filename) - y + 1) ActiveSheet.Name = t Open filename For Input As #1 x = 2 Range("A1") = "COMMAND" Range("B1") = "BSC" Range("C1") = "BCF NO" Range("D1") = "SITE TYPE" Range("E1") = "BCF ADM STATE" Range("F1") = "BCF STATUS" Range("G1") = "OMU NAME" Range("H1") = "BTS NAME" Range("I1") = "OMU STATUS" Range("J1") = "LAC" Range("K1") = "CI" Range("L1") = "BTS NO" Range("M1") = "BTS ADM STATUS" Range("N1") = "BTS STATUS" Range("O1") = "HALF RATE CALL" Range("P1") = "FULL RATE CALL" Range("Q1") = "OMU BCSU" Range("R1") = "HOP" Range("S1") = "GPRS SUBS" Range("T1") = "TRX NO" Range("U1") = "TRX ADM STATE" Range("V1") = "TRX STATUS" Range("W1") = "TRX FREQ" Range("X1") = "ET NO" Range("Y1") = "CHANNEL" Range("Z1") = "TRX BCSU" Range("A1:Z1").HorizontalAlignment = xlCenter Range("A1:Z1").Font.Bold = True Do Until EOF(1) Line Input #1, t If InStr(t, "BSC") = 1 Then b = Trim(Mid(t, 11, 7)) Line Input #1, t Line Input #1, t Line Input #1, t Line Input #1, t Line Input #1, t Line Input #1, t Line Input #1, t Line Input #1, t End If If InStr(t, "BCF") = 1 Then c1 = Trim(Mid(t, 5, 4)) 'bcf no d1 = Trim(Mid(t, 10, 10)) 'site type e1 = Trim(Mid(t, 23, 3)) 'bcf adm state f1 = Trim(Mid(t, 26, 6)) 'bcf status g1 = Trim(Mid(t, 62, 2)) 'omu bcsu h1 = Trim(Mid(t, 65, 5)) 'omu name i1 = Trim(Right(t, 2)) 'omu status Line Input #1, t End If If InStr(t, "BTS") = 14 Then j1 = Trim(Mid(t, 2, 5)) 'lac k1 = Trim(Mid(t, 8, 5)) 'ci l1 = Trim(Mid(t, 18, 4)) 'bts no m1 = Trim(Mid(t, 24, 1)) 'bts adm state n1 = Trim(Mid(t, 26, 6)) 'bts status o1 = Trim(Mid(t, 73, 4)) 'half rate call p1 = Trim(Right(t, 3)) 'full rate call Line Input #1, t q1 = Trim(Mid(t, 2, 14)) 'bts NAME r1 = Trim(Mid(t, 18, 3)) 'hop s1 = Trim(Right(t, 3)) 'gprs Line Input #1, t End If If InStr(t, "TRX") = 15 Then Cells(x, 1) = "ZEEI" 'command Cells(x, 2) = b 'bsc Cells(x, 3) = c1 'BCF NO Cells(x, 4) = d1 ' SITE TYPE Cells(x, 5) = e1 'bcf adm state Cells(x, 6) = f1 ' bcf status Cells(x, 7) = h1 ' omu name Cells(x, 8) = q1 ' omu bcsu Cells(x, 9) = i1 'omu status Cells(x, 10) = j1 'lac Cells(x, 11) = k1 'ci Cells(x, 12) = l1 'bts no Cells(x, 13) = m1 'bts adm status Cells(x, 14) = n1 'bts status Cells(x, 15) = o1 'half rate Cells(x, 16) = p1 ' full rate Cells(x, 17) = g1 'bts name Cells(x, 18) = r1 'hop Cells(x, 19) = s1 'gprs Cells(x, 20) = Trim(Mid(t, 19, 3)) 'TRX NO Cells(x, 21) = Trim(Mid(t, 24, 1)) 'TRX ADM STATE Cells(x, 22) = Trim(Mid(t, 26, 8)) 'TRX STATUS Cells(x, 23) = Trim(Mid(t, 34, 3)) 'TRX FREQ Cells(x, 24) = Trim(Mid(t, 42, 4)) 'ET NO Cells(x, 25) = Trim(Mid(t, 46, 11)) 'MBCCH Cells(x, 26) = Trim(Right(t, 2)) x = x + 1 End If Loop Cells.Select Selection.NumberFormat = "General" 'Range("K13").Select Cells.Select Selection.Font.Size = 8 Selection.Font.Name = "Arial" Selection.Columns.AutoFit Selection.AutoFilter Close MsgBox ("Done.") End Sub ' praveen access india From: excel-macros@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of madhur baharani Sent: Monday, November 17, 2008 2:21 PM To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ VBA_PASSWORD_REQUIRED Dear Friends I want to know the macro source code of th attached file, but it has been locked. Please anybody unlock the file without any damage to the file. please send me the pass word also. If possible please sugest a good password breaker. My ID is [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ Visit the blog to download Excel tutorials at http://www.excel-macros.blogspot.com To post to this group, send email to excel-macros@googlegroups.com For more options, visit this group at http://groups.google.com/group/excel-macros?hl=en Visit & Join Our Orkut Community at http://www.orkut.com/Community.aspx?cmm=22913620 Visit the blog to download Excel tutorials at http://www.excel-macros.blogspot.com To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com To see the Daily Excel Tips, Go to: http://exceldailytip.blogspot.com -~----------~----~----~----~------~----~------~--~---