Project 2 - Create a report using PowerQuery, Macro VBA, List Functions and Data Validation functions for Data Reporting of Supply Chain Management companies
Sub ConvertToPDF()
Dim rng As Range
Set rng = Selection
Dim wb As Workbook
Set wb = Workbooks.Add
rng.Copy wb.Sheets(1).Range("A1")
Dim filePath As String
Dim fileName As String
filePath = "C:\Path\To\Save\PDF\File\"
fileName = "ApplicantData.pdf"
With wb
.ExportAsFixedFormat Type:=xlTypePDF, Filename:=filePath & fileName, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False
.Close SaveChanges:=False
End With
MsgBox "Selected data has been converted to PDF.", vbInformation
End Sub
Sub CheckSpelling()
Dim ws As Worksheet
Dim rng As Range
Dim cell As Range
For Each ws In ThisWorkbook.Worksheets
Set rng = ws.UsedRange
For Each cell In rng
If Not Application.CheckSpelling(cell.Value) Then
cell.Interior.Color = RGB(255, 0, 0) ' Red color
End If
Next cell
Next ws
MsgBox "Spelling check completed.", vbInformation
End Sub