
Macro3 Macro
'
'
Windows("CORVINO SILVIA.xlsm").Activate
Sheets("Visita2016").Select
ActiveSheet.Buttons.Add(130.8, 1484.4, 130.8, 37.2).Select
ActiveSheet.Buttons.Add(7.8, 1483.2, 114, 37.2).Select
ActiveSheet.Buttons.Add(0.6, 1457.4, 47.4, 15.6).Select
ActiveSheet.Buttons.Add(6, 1006.2, 108, 16.2).Select
ActiveSheet.Buttons.Add(267, 1486.2, 105, 33.6).Select
ActiveSheet.Buttons.Add(378.6, 1485.6, 93.6, 33).Select
Sheets("Visita2016").Copy Before:=Workbooks("NUOVO.xlsm").Sheets(2)
ActiveWindow.SmallScroll Down:=-69
Range("A22:I27").Select
Selection.Copy
Sheets("VISITA").Select
Range("A18:I23").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub |
Sub AggiungiFoglioLT()
Dim WBW As Workbook
Dim fileToOpen
fileToOpen = Application.GetOpenFilename("Tutti i File di Excel (*.xl*; *.xlsx; *.xlsm; *.xlsb; *.xlam; *.xltx; *.xltm; *.xls; *.xlt; *.xml; *.xla; *.xlm; *.xlw), *.xl*; *.xlsx; *.xlsm; *.xlsb; *.xlam; *.xltx; *.xltm; *.xls; *.xlt; *.xml; *.xla; *.xlm; *.xlw")
If fileToOpen = False Then Exit Sub
If MsgBox("Apro il file " & fileToOpen & " e procedo on l'elaborazione?", vbYesNo + vbQuestion, "PROCEDO?") = vbYes Then
Set WBW = Workbooks.Open(fileToOpen)
Windows(Name).Activate
With WBW.Sheets("Visita2016")
.Select
.Buttons.Add 130.8, 1484.4, 130.8, 37.2
.Buttons.Add 7.8, 1483.2, 114, 37.2
.Buttons.Add 0.6, 1457.4, 47.4, 15.6
.Buttons.Add 6, 1006.2, 108, 16.2
.Buttons.Add 267, 1486.2, 105, 33.6
.Buttons.Add 378.6, 1485.6, 93.6, 33
.Copy Before:=Workbooks("NUOVO.xlsm").Sheets(2)
.Range("A22:I27").Copy
Sheets("VISITA").Range("A18:I23").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End With
End If
End Sub |
Sub AggiungiFoglioLT_01()
Dim WBW As Workbook
Dim fileToOpen
ChDir ("C:Usersxxxxxxxxxx 0-yyyyyyygggggg") '<= inserire qui la cartella comune dove hai i tuoi file
fileToOpen = Application.GetOpenFilename("Tutti i File di Excel (*.xl*; *.xlsx; *.xlsm; *.xlsb; *.xlam; *.xltx; *.xltm; *.xls; *.xlt; *.xml; *.xla; *.xlm; *.xlw), *.xl*; *.xlsx; *.xlsm; *.xlsb; *.xlam; *.xltx; *.xltm; *.xls; *.xlt; *.xml; *.xla; *.xlm; *.xlw")
If fileToOpen = False Then Exit Sub
If MsgBox("Apro il file " & fileToOpen & " e procedo on l'elaborazione?", vbYesNo + vbQuestion, "PROCEDO?") = vbYes Then
Set WBW = Workbooks.Open(fileToOpen)
WBW.Activate
With WBW.Sheets("Visita2016")
.Select
.Buttons.Add 130.8, 1484.4, 130.8, 37.2
.Buttons.Add 7.8, 1483.2, 114, 37.2
.Buttons.Add 0.6, 1457.4, 47.4, 15.6
.Buttons.Add 6, 1006.2, 108, 16.2
.Buttons.Add 267, 1486.2, 105, 33.6
.Buttons.Add 378.6, 1485.6, 93.6, 33
.Copy Before:=Workbooks("NUOVO.xlsm").Sheets(2)
.Range("A22:I27").Copy
Sheets("VISITA").Range("A18:I23").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End With
End If
End Sub
|
ChDrive "G" o ChDrive("G") |
Sub provoinserimentofile()
Dim WBW As Workbook
Dim fileToOpen
ChDrive ("G")
ChDir ("G:UfficioAAA_BBB_CCCZZ")
fileToOpen = Application.GetOpenFilename("Tutti i File di Excel (*.xl*; *.xlsx; *.xlsm; *.xlsb; *.xlam; *.xltx; *.xltm; *.xls; *.xlt; *.xml; *.xla; *.xlm; *.xlw), *.xl*; *.xlsx; *.xlsm; *.xlsb; *.xlam; *.xltx; *.xltm; *.xls; *.xlt; *.xml; *.xla; *.xlm; *.xlw")
If fileToOpen = False Then Exit Sub
If MsgBox("Apro il file " & fileToOpen & " e procedo on l'elaborazione?", vbYesNo + vbQuestion, "PROCEDO?") = vbYes Then
Set WBW = Workbooks.Open(fileToOpen)
WBW.Activate
With WBW.Sheets("Visita2016")
.Select
.Buttons.Add 130.8, 1484.4, 130.8, 37.2
.Buttons.Add 7.8, 1483.2, 114, 37.2
.Buttons.Add 0.6, 1457.4, 47.4, 15.6
.Buttons.Add 6, 1006.2, 108, 16.2
.Buttons.Add 267, 1486.2, 105, 33.6
.Buttons.Add 378.6, 1485.6, 93.6, 33
.Copy Before:=Workbooks("NUOVO.xlsm").Sheets(2)
.Range("A22:I27").Copy
Sheets("VISITA").Range("A18:I23").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End With
End If
End Sub |
ChDrive ("D")
ChDir ("D:Libriprova")
|
