Project 2 - Create a report using PowerQuery, Macro VBA, List Functions and Data Validation functions for Data Reporting of Supply Chain Management companies
https://1drv.ms/w/c/952b74e91fb93003/EYJO54pCr0VKhidKuIu4DJgBwYcCwQEouPwD9xE7vksLQg?e=21VNeL
- Create VBA Code to convert selected data into pdf from applicant data
Public Sub print_data_selected()
'subroutine: printchartsheetstoPDF
'developer: Ryan wells
'description: Combine all chart sheets into one PDF
Dim strsheets() As String
Dim strfiles As String
Dim ch As Object, sh As Worksheet
Dim icount As Integer
Dim myfile As Variant
'save chart sheet name to an array
For Each ch In ActiveWorkbook.Charts
ReDim Preserve strsheets(icount)
icount = icount + 1
Next ch
If Count = 0 Then 'no charts found.punch error
MsgBox "a PDF cannot be created because no chart sheets were found.", , "no chart sheets found"
Exit Sub
End If
'prompt for save loacation
Strfile = "Charts" & "_"_
& Format(Now(),"yyyymmdd_hhmmss")_
Strfile = ThisWorkbook.Path & "\" & Strfile
mylife = Application.GetSaveAsFilename_
(InitialFileName:=strfile,_
FileFilter:="PDF Files (*.pdf), *.pdf",_
Title:="select Folder and File Name to save as PDF")
If mylife <> "false" Then 'save as PDF
ThisWorkbook.Sheets(strsheets).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=_
myfile , Quality:=xlQualityStandard, IncludeDocProperties:=True,_
Else
MsgBox "NO File Selected. PDF will not be saved", vbOKOnly, "No File selected"
End If
End Sub
- Check Spelling mistakes in the workbook using VBA Code
Public Sub spelling_mistake()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If Not Application.CheckSpelling(word:=cell.Text) Then
cell.Style = "bad"
End If
Next cell
End Sub