Valutazione 4.87/ 5 (100.00%) 5838 voti

Condividi:        

Finestra messaggio Macro excel 2010

Vuoi potenziare i tuoi documenti Word? Non sai come si fa una macro in Excel? Devi creare una presentazione in PowerPoint?
Oppure sei passato a OpenOffice e non sei sicuro di come lavorare al meglio?

Moderatori: Anthony47, Flash30005

Finestra messaggio Macro excel 2010

Postdi rozzo » 24/08/15 11:46

Ciao a tutti, chiedo se possibile far uscire una finestra con del testo personalizzato alla fine di un eseguimento di macro.
Grazie

Ps.
In allegato, quando avrò finito di compilare il foglio di excel vi mando i codici macro così magari me lo modificate in modo da farmi apparire la finsetra.
rozzo
Newbie
 
Post: 8
Iscritto il: 07/08/15 12:58

Sponsor
 

Re: Finestra messaggio Macro excel 2010

Postdi rozzo » 24/08/15 11:57

Eccovi il codice Macro:

Alla fine di questo codice vorrei che mi apparisse una finestra con scritto "Macro eseguita correttamente" e il pulsante ok...
e se possibile scrivetemi il codice che avete utilizzato per fare questa finestra.

Grazie mille

Codice: Seleziona tutto
Sub ARGO()
'
' ARGO Macro
'
' Scelta rapida da tastiera: CTRL+a
'
    Columns("A:A").Select
    Selection.Delete Shift:=xlToLeft
    Columns("E:E").Select
    Selection.Delete Shift:=xlToLeft
    Columns("H:H").Select
    Selection.Delete Shift:=xlToLeft
    Sheets("Non eliminare").Select
    Columns("A:A").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("A:A").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Base").Select
    Columns("H:H").Select
    Selection.Cut
    Columns("C:C").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("B:B").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("D:D").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("C:C").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("E:E").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Base").Select
    Columns("I:I").Select
    Selection.Cut
    Columns("F:F").Select
    Selection.Insert Shift:=xlToRight
    Columns("J:J").Select
    Selection.Cut
    Columns("G:G").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("D:D").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("H:H").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("E:E").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("I:I").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("F:F").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("J:J").Select
    Selection.Insert Shift:=xlToRight
    Columns("M:M").Select
    Selection.Cut
    Columns("K:K").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("G:G").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("L:L").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("J:J").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("M:M").Select
    Selection.Insert Shift:=xlToRight
    Columns("O:O").Select
    Selection.Cut
    Columns("N:N").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("K:K").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("O:O").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("L:L").Select
    Selection.Cut
    Sheets("Base").Select
    Columns("P:P").Select
    Selection.Insert Shift:=xlToRight
    Sheets("Non eliminare").Select
    Columns("M:M").Select
    Selection.Cut
    Sheets("Base").Select
    ActiveWindow.ScrollColumn = 2
    ActiveWindow.ScrollColumn = 3
    ActiveWindow.ScrollColumn = 4
    Columns("Q:Q").Select
    Selection.Insert Shift:=xlToRight
    ActiveWindow.ScrollColumn = 5
    ActiveWindow.ScrollColumn = 6
    ActiveWindow.ScrollColumn = 7
    ActiveWindow.ScrollColumn = 8
    ActiveWindow.ScrollColumn = 7
    ActiveWindow.ScrollColumn = 6
    ActiveWindow.ScrollColumn = 5
    ActiveWindow.ScrollColumn = 4
    ActiveWindow.ScrollColumn = 3
    ActiveWindow.ScrollColumn = 2
    ActiveWindow.ScrollColumn = 1
    Columns("B:B").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("D:D").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("F:F").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("H:H").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("J:J").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("L:L").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("N:N").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    ActiveWindow.ScrollColumn = 2
    ActiveWindow.ScrollColumn = 3
    ActiveWindow.ScrollColumn = 4
    ActiveWindow.ScrollColumn = 5
    ActiveWindow.ScrollColumn = 6
    ActiveWindow.ScrollColumn = 7
    ActiveWindow.ScrollColumn = 8
    ActiveWindow.ScrollColumn = 9
    ActiveWindow.ScrollColumn = 10
    ActiveWindow.ScrollColumn = 11
    Columns("P:P").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("R:R").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("T:T").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("V:V").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("X:X").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("Z:Z").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    ActiveWindow.ScrollColumn = 12
    ActiveWindow.ScrollColumn = 13
    ActiveWindow.ScrollColumn = 14
    ActiveWindow.ScrollColumn = 15
    ActiveWindow.ScrollColumn = 16
    ActiveWindow.ScrollColumn = 17
    ActiveWindow.ScrollColumn = 18
    ActiveWindow.ScrollColumn = 19
    ActiveWindow.ScrollColumn = 20
    Columns("AB:AB").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("AD:AD").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("AF:AF").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("AH:AH").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    ActiveWindow.ScrollColumn = 19
    ActiveWindow.ScrollColumn = 18
    ActiveWindow.ScrollColumn = 17
    ActiveWindow.ScrollColumn = 16
    ActiveWindow.ScrollColumn = 15
    ActiveWindow.ScrollColumn = 14
    ActiveWindow.ScrollColumn = 13
    ActiveWindow.ScrollColumn = 11
    ActiveWindow.ScrollColumn = 9
    ActiveWindow.ScrollColumn = 8
    ActiveWindow.ScrollColumn = 7
    ActiveWindow.ScrollColumn = 6
    ActiveWindow.ScrollColumn = 5
    ActiveWindow.ScrollColumn = 4
    ActiveWindow.ScrollColumn = 3
    ActiveWindow.ScrollColumn = 2
    ActiveWindow.ScrollColumn = 1
    ActiveWindow.Zoom = 85
    ActiveWindow.Zoom = 70
    ActiveWindow.Zoom = 55
    ActiveWindow.Zoom = 40
    Range( _
        "AH:AH,B:B,D:D,F:F,H:H,J:J,L:L,N:N,P:P,R:R,T:T,V:V,X:X,Z:Z,AB:AB,AD:AD,AF:AF"). _
        Select
    Range("AF1").Activate
    Selection.ColumnWidth = 1
    ActiveWindow.SmallScroll Down:=-15
    ActiveWindow.Zoom = 55
    ActiveWindow.Zoom = 70
    ActiveWindow.Zoom = 85
    ActiveWindow.ScrollColumn = 1
    Columns("A:A").Select
    Selection.ColumnWidth = 1
    Columns("C:C").Select
    Selection.ColumnWidth = 6
    Columns("E:E").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Selection.Delete Shift:=xlToLeft
    Selection.ColumnWidth = 8
    Columns("G:G").Select
    Selection.ColumnWidth = 2
    Columns("I:I").Select
    Selection.ColumnWidth = 2
    Columns("K:K").Select
    Selection.ColumnWidth = 6
    Columns("M:M").Select
    Selection.ColumnWidth = 8
    Columns("O:O").Select
    Selection.ColumnWidth = 15
    Columns("Q:Q").Select
    Selection.ColumnWidth = 15
    Columns("S:S").Select
    Selection.ColumnWidth = 2
    Columns("U:U").Select
    Selection.ColumnWidth = 9.2
    Columns("W:W").Select
    Selection.ColumnWidth = 35
    Columns("Y:Y").Select
    Selection.ColumnWidth = 20
    Columns("AA:AA").Select
    Selection.ColumnWidth = 8
    Columns("AC:AC").Select
    Selection.ColumnWidth = 19.6
    Columns("AE:AE").Select
    Selection.ColumnWidth = 1
    Columns("AG:AG").Select
    Selection.ColumnWidth = 14
    Cells.Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    Selection.Borders(xlEdgeTop).LineStyle = xlNone
    Selection.Borders(xlEdgeBottom).LineStyle = xlNone
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
    Sheets("Non eliminare").Select
    ActiveWindow.SelectedSheets.Visible = False
End Sub
rozzo
Newbie
 
Post: 8
Iscritto il: 07/08/15 12:58

Re: Finestra messaggio Macro excel 2010

Postdi alfrimpa » 24/08/15 13:03

Prima di End Sub aggiungi

MsgBox "Macro eseguita correttamente"
Alfredo

Win7 + Office 2007
Avatar utente
alfrimpa
Utente Senior
 
Post: 840
Iscritto il: 30/12/13 17:01
Località: Napoli


Torna a Applicazioni Office Windows


Topic correlati a "Finestra messaggio Macro excel 2010":


Chi c’è in linea

Visitano il forum: Nessuno e 14 ospiti