Hi All,

I need some help figuring out the next move for my VBA code.

First of all i want to print each worksheet in a workbook into a separate .pdf-file. Until now I've had a code for each sheet, which look like this:
Sub PrintWorksheets()
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\PATH\INDIVIDUAL_FILENAME.pdf", Quality:=xlQualityStandard, _
        IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub
This works fine, and I've made a macro which calls each individual sub.

My new thought was something like this:
Sub PrintWorksheets()
    Dim WkSht As Worksheet
    Dim WkShtName As String
Set WkShtName = ActiveSheet.Name
    For Each WkSht In ActiveWorkbook.Worksheets
        ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\PATH\" & WkShtName & ".pdf", Quality:=xlQualityStandard, _
        IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
    Next WkSht
End Sub
My problem is that it doesn't flip through the worksheets or that it overwrites the document in the folder already. The WkShtName isn't giving the correct value, but just the sheet which is active, when I run the macro. - Is this the best way or should it be a loop function?

Furthermore, how would I be able to attach a progress bar to this? And is it possible to make it with dynamic feature (one that counts the remaining subs, perhaps?), for future functionality... (Easier if new sheets are added)

Thanks in advance!