Mefisto...diabeł czy anioł?

:/
Mo¿e kto¶ je poprawiæ? Tak by robi³o czynno¶ci dla ró¿nych zakresów i ¿eby b³êdu na koniec nie wywala³o....


Sub xxx()
'
' xxx Makro
'

'
    Columns("B:B").Select
    Selection.Delete Shift:=xlToLeft
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Range("A7:N12").Select
    ActiveWorkbook.Worksheets("report").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("report").Sort.SortFields.Add Key:=Range("A7"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("report").Sort
        .SetRange Range("A7:N12")
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Selection.Font.Bold = True
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 10092543
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    With Selection.Font
        .Name = "Czcionka tekstu podstawowego"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ThemeColor = xlThemeColorLight1
        .TintAndShade = 0
        .ThemeFont = xlThemeFontNone
    End With
    Range("A7:N7").Select
    ChDir "C:\DOCUME~1\Mirek\USTAWI~1\Temp\Rar$DI08.016"
   
    ChDir "C:\Documents and Settings\Mirek\Pulpit\"

Application.Dialogs(xlDialogSaveWorkbook).Show , _
            IIf(Val(Application.Version) > 11, xlExcel8, 1)
End Sub


Jak co¶ to pytajcie [/center]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • katkaras.opx.pl