Moderatori: Anthony47, Flash30005
Dim TmpF As Object
Set TmpF = ActiveWindow
TmpF.Activate
Sub CARENZE01()
'
' CARENZE01 Macro
' 02/09/19 nr.1
'
'
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", 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)), TrailingMinusNumbers:=True
Columns("C:L").Select
Selection.Delete Shift:=xlToLeft
Range("A1").Select
ActiveCell.FormulaR1C1 = "Date : 02.09.19 [15:31]"
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("3:3,5:5").Select
Range("A5").Activate
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("C8").Select
Columns("A:A").ColumnWidth = 12.14
Columns("B:B").ColumnWidth = 33.43
Rows("3:3").Select
Selection.Font.Bold = True
With Selection.Font
.Color = -16777024
.TintAndShade = 0
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("C3").Select
ActiveCell.FormulaR1C1 = "BP"
Range("D3").Select
ActiveCell.FormulaR1C1 = "Rag. Soc."
Range("E3").Select
ActiveCell.FormulaR1C1 = "Resp."
Range("F3").Select
ActiveCell.FormulaR1C1 = "Note"
Range("E6").Select
Columns("D:D").ColumnWidth = 22.29
Columns("E:E").ColumnWidth = 6.29
Columns("F:F").ColumnWidth = 38.57
Range("C1").Select
ActiveCell.FormulaR1C1 = "AL"
Range("C1").Select
Selection.Font.Bold = True
Range("C1:D1").Select
Selection.Font.Bold = False
Selection.Font.Bold = True
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("C5615").Select
Windows("tmp088752411.txt").Activate
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-2],'[Forn Pref Articoli.xlsx]ORIGINE'!C1:C3,2,FALSE)"
Range("D4").Select
Application.CutCopyMode = False
Windows("Forn Pref Articoli.xlsx").Activate
ActiveWindow.Close
Application.WindowState = xlNormal
Application.WindowState = xlMinimized
Application.WindowState = xlNormal
Windows("tmp088752411.txt").Activate
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-1],'[Supplier Data.xlsx]supplier data'!C1:C7,2,FALSE)"
Range("E4").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-2],'[Supplier Data.xlsx]supplier data'!C1:C7,7,FALSE)"
Range("D9").Select
ActiveWindow.Close
Range("C4:E4").Select
Selection.AutoFill Destination:=Range("C4:E119")
Range("C4:E119").Select
Range("D1:F1").Select
With Selection.Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("C1").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("C1").Select
Selection.ClearContents
Range("D1").Select
ActiveCell.FormulaR1C1 = "CARENZE"
Range("E1").Select
ActiveCell.FormulaR1C1 = "AL"
Range("E1").Select
Selection.Font.Bold = True
Range("D1").Select
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("F4").Select
End Sub
Sub CARENZE02()
'
' CARENZE02 Macro
' 02/09/19
'
'
Application.Run "PERSONAL.XLSB!CARENZE01"
Range("C4").Select
F1Name = ActiveWorkbook.Name
Workooks(F1Name).Activate
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-2],'[Forn Pref Articoli.xlsx]ORIGINE'!C1:C2,2,FALSE)"
Range("D4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-3],'[Forn Pref Articoli.xlsx]ORIGINE'!C1:C3,3,FALSE)"
Range("E4").Select
Windows("Forn Pref Articoli.xlsx").Activate
ActiveWindow.Close
Workooks(F1Name).Activate
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-2],'[Supplier Data.xlsx]supplier data'!C1:C7,7,FALSE)"
ActiveWindow.Close
Range("F19").Select
Application.WindowState = xlNormal
Workooks(F1Name).Activate
Workooks(F1Name).Activate
Range("E4").Select
End Sub
Sub CARENZE01()
'
' CARENZE01 Macro
' 02/09/19 nr.1
'
Dim TmpF As Object '<<< Aggiungi
'
Set TmpF = ActiveWindow '<<< Aggiungi
Columns("A:A").Select
'il codice continua
TmpF.Activate
Torna a Applicazioni Office Windows
Inserire add.in nella barra di avvio veloce in excel 2003 Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 4 |
Excel: problema con date se devo unirle a testi Autore: valle1975 |
Forum: Applicazioni Office Windows Risposte: 5 |
Licenze online windows ed office. Cosa buona?... Autore: nippon |
Forum: Sistemi Operativi Windows Risposte: 5 |
Visitano il forum: Anthony47 e 27 ospiti