IntroductionNumberingSequencesStructuresModellingMacrosPublicationsLinks
ColoringSequence StatisticsRenumberingAccessibilityTorsion AnglesStructural VariabilityHydrogen BondsDownloads

Macro RSA_GetFiles

xxx.

Usage:

  • xxx
  • xxx

Cauton:

xxx

Sub Rsa_GetFiles()

    'collect individual naccess result files (rsa-files) into a single workbook
    'filenames are listed in the first column of the "Files"-worksheet

    WBname = ActiveWorkbook.Name
  
    For i = 1 To 255 Step 1
        If IsEmpty(Sheets("Files").Cells(i, 1)) Then Exit For
    
            aaa = Sheets("Files").Cells(i, 1)
                
                                                                                  'get rsa file
            Workbooks.OpenText FileName:=aaa, Origin _
                :=xlMacintosh, StartRow:=1, DataType:=xlFixedWidth, FieldInfo _
                :=Array(Array(0, 1), Array(3, 1), Array(7, 1), Array(9, 1), Array(14, 1), _
                Array(23, 1), Array(29, 1), Array(36, 1), Array(42, 1), Array(49, 1), Array(55 _
                , 1), Array(62, 1), Array(68, 1), Array(75, 1))
                
                                                                                              'format columns
            Columns("A:B").Select
            Selection.ColumnWidth = 4
            Columns("C:C").Select
            Selection.ColumnWidth = 3
            Columns("D:D").Select
            Selection.ColumnWidth = 5
            Selection.Font.Bold = True
            Columns("E:N").Select
            Selection.ColumnWidth = 6
                
                                                                                  'add to workbook
            Workbooks(aaa).Sheets(aaa).Move After:=Workbooks(WBname).Sheets(i)
            
                                                                                  'add and format headers
            Columns("A:A").Select
            Selection.Delete Shift:=xlToLeft
            Rows("1:1").Select
            Selection.Clear
            
            Range("D1").Select
            ActiveCell.FormulaR1C1 = "all atoms"
    
            Range("F1").Select
            ActiveCell.FormulaR1C1 = "nonpolar sc"
            
            Range("H1").Select
            ActiveCell.FormulaR1C1 = "polar sc"
    
            Range("J1").Select
            ActiveCell.FormulaR1C1 = "total sc"
    
            Range("L1").Select
            ActiveCell.FormulaR1C1 = "main chain"
    
            Rows("2:3").Select
            Selection.Delete Shift:=xlUp

    Next i
    
End Sub
AAAAA Homepage Zürich University Dept. of Biochemistry Plückthun Group Annemarie Honegger

Last Modified by A.Honegger Wednesday, January 26, 2005