I am stump as this macro has been developed and use for many months not by me. Hope someone can guide me as I am a new user to macro. Thks. below is the problem code
PHP Code:
Open p_1_calls_ < yyyymmdd >. lst On Error GoTo OpenDataFileHandler DataFileName = "p_1_calls_" Workbooks . OpenText FileName := source_dir & DataFileName & mydate & ".lst" , _ Origin := xlWindows , startRow := 1 , DataType := xlDelimited , TextQualifier := _ xlDoubleQuote , ConsecutiveDelimiter := False , Tab := True , Semicolon := True , _ Comma := False , Space := False , Other := False , FieldInfo :=Array(Array( 1 , 1 ), _ Array( 2 , 1 ), Array( 3 , 1 ), Array( 4 , 1 ), Array( 5 , 1 ), Array( 6 , 1 ), Array( 7 , 1 ), Array( 8 , 1 )) Windows ( "p_1_calls_" & mydate & ".lst" ). Activate Range ( "A1" ). Select Selection . Sort Key1 := Range ( "A3" ), Order1 := xlAscending , Header := xlGuess , _ OrderCustom := 1 , MatchCase := False , Orientation := xlTopToBottom Columns ( "A:H" ). Select Set myRange = Range ( "A1" ). CurrentRegion Columns ( "A:A" ). Select Selection . FindNext ( After := ActiveCell ). Activate Range ( ActiveCell . Row & ":" & myRange . Rows . Count ). Select Selection . ClearContents Range ( "A1" ). Select < ERRORS OCCUR HERE > ActiveWorkbook . SaveAs FileName := temp_dir + "p_1.txt" , FileFormat _ := xlText , CreateBackup := False ActiveWindow . WindowState = xlMinimized
Bookmarks