Ilino
XLDnaute Barbatruc
Bonjour FORUM
CI dessous un code ( merci benevole de ce forum !!)
pour un bouton dans un USF POUR UNE FEUILLE bien specifiée, je souhaite de le generaliser sur l'enssemble des feuille de mon classeir ( c-a-d sur la feuille active)
j'ai modifier a ce niveau la
ça marche pas?
Merci par avance
CI dessous un code ( merci benevole de ce forum !!)
Code:
Private Sub CommandButton1_Click()
Dim w As Worksheet
On Error GoTo 1
For Each w In Worksheets
w.PageSetup.PrintArea = IIf(TextBox1 & TextBox2 = "", "", TextBox1 & ":" & TextBox2)
Next
On Error GoTo 0
Unload Me
Sheets("FGP 2014").PrintOut
Exit Sub
1 MsgBox "Référence non valide... @Ilinio !", 48
If TypeName(Evaluate("'" & w.Name & "'!" & TextBox1 & ":A1")) <> "Range" Then
TextBox1.SetFocus: TextBox1.SelStart = 0: TextBox1.SelLength = Len(TextBox1)
Else
TextBox2.SetFocus: TextBox2.SelStart = 0: TextBox2.SelLength = Len(TextBox2)
End If
End Sub
pour un bouton dans un USF POUR UNE FEUILLE bien specifiée, je souhaite de le generaliser sur l'enssemble des feuille de mon classeir ( c-a-d sur la feuille active)
j'ai modifier a ce niveau la
Code:
Sheets("FGP 2014").PrintOut ' ====> par Sheets.active.PrintOut
Merci par avance