[COLOR=#d3d3d3]'[/COLOR]
[COLOR=#0000cd]Private Sub CommandButton1_Click()
Dim strFilename As String
Dim idx As Long
On Error GoTo Hell
ActiveWorkbook.Sheets("Dashboard").Activate
For idx = 0 To (Me.ComboBox1.ListCount - 1)
Me.ComboBox1.ListIndex = idx
Me.Calculate
Do Until Application.Ready
DoEvents
Loop
strFilename = "D:\Reports\" & Me.ComboBox1 & ".pdf"
Application.DisplayAlerts = False
Me.ExportAsFixedFormat Type:=xlTypePDF, Filename:=strFilename, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Application.StatusBar = " Saving " & strFilename
Application.DisplayAlerts = True
Next
GetOut:
Application.DisplayAlerts = True
Application.StatusBar = vbNullString
Exit Sub
Hell:
MsgBox "Error # " & Err.Number & vbNewLine & vbNewLine & Err.Description, vbCritical, "Notification"
Resume GetOut
End Sub
[/COLOR][COLOR=#d3d3d3]'
'[/COLOR]