marcel31281
Gebruiker
- Lid geworden
- 30 okt 2015
- Berichten
- 391
Bedankt allemaal voor jullie reacties, en een fijne avond verder nog
Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Sub LastRowInOneColumn()
'Find the last used row in a Column: column A in this example
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
End With
ActiveSheet.PageSetup.PrintArea = "A5:J" & LastRow
bereik = ActiveSheet.PageSetup.PrintArea
Range(bereik).PrintPreview
End Sub
Sub LastRowInOneColumn()
'Find the last used row in a Column: column A in this example
Dim LastRow As Long
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.LeftMargin = Application.InchesToPoints(0.3)
.RightMargin = Application.InchesToPoints(0.1)
.TopMargin = Application.InchesToPoints(0.3)
.BottomMargin = Application.InchesToPoints(0.2)
.HeaderMargin = Application.InchesToPoints(1.3)
.FooterMargin = Application.InchesToPoints(1.3)
End With
With ActiveSheet
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
End With
ActiveSheet.PageSetup.PrintArea = "A5:J" & LastRow
bereik = ActiveSheet.PageSetup.PrintArea
With Application.FileDialog(msoFileDialogFolderPicker)
.Title = "Selecteer map"
.ButtonName = .Title
.Show
If .SelectedItems.Count > 0 Then
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=.SelectedItems(1) & "\" & Range("B8") & ("_") & Range("B11") & ".pdf", _
OpenAfterPublish:=False 'Zet deze op False om de PDF niet te openen
End If
End With
End Sub
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.