Rip1971
Board Regular
- Joined
- Nov 3, 2020
- Messages
- 65
- Office Version
- 365
- Platform
- Windows
Hi all i have found some pieces of code that do what do i want. except for 1 small thing.
It should print all worksheets which contain the word "Voorblad" how can i add a wildcard so i adds all worksheets.
It should print all worksheets which contain the word "Voorblad" how can i add a wildcard so i adds all worksheets.
VBA Code:
Sub Print_Voorblad()
Dim cntr As Long, Arr(), ws As Worksheet
cntr = 0
For Each ws In ActiveWorkbook.Worksheets
If ws.Name = "Voorblad*" Then
ReDim Preserve Arr(cntr)
Arr(cntr) = ws.Name
cntr = cntr + 1
End If
Next ws
With ActiveWorkbook
.Worksheets(Arr).PrintOut
End With
End Sub