excel2007 per makro drucken

Hallo zusammen,
Excel 2007 per makro die akteulle Tabelle drucken
Mit Abfrage welche seite und Anzahl der kopien
1001 Dank im Vorraus

Hallo 3abdel3aziz,

warum gehst du nicht via Menü-Datei-Drucken, dann hast du alle benötigten Eingabefelder?

Gruß
Franz

per Makro bekommst du den Dialog direkt so angezeigt:

Sub Drucken()
 Application.Dialogs(xlDialogPrint).Show
End Sub

'oder mit 3 InputBoxen
Sub Drucken2()
 'aktives Blatt drucken
 Dim objSheet As Object
 Dim Startseite, EndeSeite, Exemplare
 Startseite = Application.InputBox("Nr. der Startseite", "Drucken aktives Blatt", Default:=1, Type:=1)
 If Startseite = 0 Then Exit Sub
 EndeSeite = Application.InputBox("Nr. der Endeseite", "Drucken aktives Blatt", Default:=Startseite, Type:=1)
 If EndeSeite = 0 Then Exit Sub
 Exemplare = Application.InputBox("Anzahl Exemplare", "Drucken aktives Blatt", Default:=1, Type:=1)
 If Exemplare = 0 Then Exit Sub
 Set objSheet = ActiveSheet
 objSheet.PrintOut From:=Startseite, To:=EndeSeite, Copies:=Exemplare
 Set objSheet = Nothing
End Sub