Pagina precedente | 1 | Pagina successiva
Vota | Stampa | Notifica email    
Autore

non stampare

Ultimo Aggiornamento: 19/03/2012 23:40
Post: 182
Registrato il: 18/02/2010
Città: MILANO
Età: 28
Utente Junior
excel 2003 / 2007
OFFLINE
19/03/2012 23:10

Ciao un aiuto per continare questa macro:

Option Explicit

Sub Stampa()

[a1].Select

   if a1="ciao"
   Exit Sub
   
    ActiveWindow.SelectedSheets.PrintPreview
    'ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    Selection.AutoFilter ' Field:=1

[a1].Select

End Sub



praticamente sarebbe se in A1 c'è scritto ciao cliccando nel pulsante
abbinato alla macro mi deve dire che non posso.
Ciao,
xam
-------------------------------
excel 2003 ufficio / 2007 casa
Post: 641
Registrato il: 28/06/2011
Città: AGORDO
Età: 70
Utente Senior
2013
OFFLINE
19/03/2012 23:28

prova cosi
Sub Stampa()
Cells(1, 1).Select
If Cells(1, 1) <> "ciao" Then
ActiveWindow.SelectedSheets.PrintPreview
'ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Selection.AutoFilter ' Field:=1
Else
MsgBox ("NON PUOI STAMPARE")
Exit Sub
End If
End Sub
Excel 2013
Post: 182
Registrato il: 18/02/2010
Città: MILANO
Età: 28
Utente Junior
excel 2003 / 2007
OFFLINE
19/03/2012 23:40

Grazie raffaele è O.K.!
Ciao,
xam
-------------------------------
excel 2003 ufficio / 2007 casa
Vota:
Amministra Discussione: | Chiudi | Sposta | Cancella | Modifica | Notifica email Pagina precedente | 1 | Pagina successiva
Nuova Discussione
 | 
Rispondi
Feed | Forum | Bacheca | Album | Utenti | Cerca | Login | Registrati | Amministra
Tutti gli orari sono GMT+01:00. Adesso sono le 21:32. Versione: Stampabile | Mobile | Regolamento | Privacy
FreeForumZone [v.6.1] - Copyright © 2000-2024 FFZ srl - www.freeforumzone.com