Challenge

Project 2 - Create a report using PowerQuery, Macro VBA, List Functions and Data Validation functions for Data Reporting of Supply Chain Management companies

https://drive.google.com/drive/folders/1u__WcqA4suLKxWG4W56hB4GfJbC_DKuH

https://drive.google.com/drive/folders/1u__WcqA4suLKxWG4W56hB4GfJbC_DKuH

1,VBA Code to convert selected data into pdf from applicant data

Sub ConvertToPDF()
' Declare variables
Dim rng As Range
Dim filePath As String
Dim printRange As String

' Set the range of selected data
Set rng = Selection

' Prompt user to select a file path and name for the PDF
filePath = Application.GetSaveAsFilename(fileFilter:="PDF Files (*.pdf), *.pdf")

' Check if a file path was selected
If filePath <> "False" Then
' Convert the range to a PDF file
printRange = rng.Address
rng.ExportAsFixedFormat Type:=xlTypePDF, Filename:=filePath, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

' Display a success message
MsgBox "Selected data has been converted to PDF and saved at: " & filePath, vbInformation
Else
' Display a message if no file path was selected
MsgBox "No file path selected. Operation canceled.", vbExclamation
End If
End Sub

--------------------------------------------------------------------------------------------------------------

2,Check Spelling mistakes in the workbook using VBA Code

Sub CheckSpelling()
Dim ws As Worksheet
Dim rng As Range

' Loop through each worksheet in the active workbook
For Each ws In ActiveWorkbook.Worksheets
' Set the range to check the spelling for the entire worksheet
Set rng = ws.UsedRange

' Check spelling for the range
rng.CheckSpelling
Next ws

' Display a message box indicating the completion of the spell check
MsgBox "Spelling check complete for all worksheets.", vbInformation
End Sub

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.