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 MaakPDFs()
Dim OutName As String, OutPath As String, PDFgemaakt As Boolean
OutName = Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 4)
OutPath = ThisWorkbook.Path & "\03 Concept\"
Application.ScreenUpdating = False
If BladBestaat("Totaal overzicht") Then
'Totaal overzicht
ActiveWorkbook.Worksheets("Totaal overzicht").Copy
ActiveWorkbook.ExportAsFixedFormat xlTypePDF, OutPath & OutName & "_t.pdf"
ActiveWorkbook.Close False
PDFgemaakt = True
End If
If BladBestaat("Overzicht huurders_B") Then
'Overzicht B
ActiveWorkbook.Worksheets("Overzicht huurders_B").Copy
ActiveWorkbook.ExportAsFixedFormat xlTypePDF, OutPath & OutName & "_o.pdf"
ActiveWorkbook.Close False
PDFgemaakt = True
End If
Application.ScreenUpdating = True
If PDFgemaakt Then
MsgBox "PDF's zijn gemaakt"
Else
MsgBox "Niet alle PDF's zijn gemaakt"
End If
End Sub
Function BladBestaat(ByVal Bladnaam As String) As Boolean
Dim Sht As Worksheet
BladBestaat = False
For Each Sht In ActiveWorkbook.Worksheets
If Sht.Name = Bladnaam Then
BladBestaat = True
Exit Function
End If
Next Sht
End Function
If BladBestaat("Totaal overzicht") = True Then
'Totaal overzicht
ActiveWorkbook.Worksheets("Totaal overzicht").Copy
ActiveWorkbook.ExportAsFixedFormat xlTypePDF, OutPath & OutName & "_t.pdf"
ActiveWorkbook.Close False
PDFgemaakt = True
Else
MsgBox "Blad Totaal overzicht niet gevonden. Controleer dit en probeer opnieuw."
Exit Sub
End If
Hopelijk heb ik wel aangepast wat jij ook in gedachte had.
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.