MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Option Explicit Sub CreateExcel3() Dim objExcel As Object Dim objFSO As Object Dim objFolder As Object Dim sExcelFolderPath As String, sExcelFileName As String Set objFSO = CreateObject("Scripting.FileSystemObject") sExcelFolderPath = "e:\temp\vba\" 'Folder path sExcelFileName = "test.xlsx" 'File name Set objExcel = CreateObject("excel.application") On Error Resume Next Set objFolder = objFSO.GetFolder(sExcelFolderPath) 'Set the folder path On Error GoTo 0 If objFolder Is Nothing Then objFSO.createfolder (sExcelFolderPath) 'Create the folder if not present objExcel.Workbooks.Add objExcel.DisplayAlerts = False objExcel.ActiveWorkbook.SaveAs (sExcelFolderPath & sExcelFileName) objExcel.Quit objExcel.DisplayAlerts = True Set objExcel = Nothing Set objFSO = Nothing Set objFolder = Nothing End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Excel VBA Script||9||57|
|Need VBA to color cell if 1st three numbers in Column C of Sheet1 match any of the numbers in Column A on Sheet2||22||48|
|Create a list of Worksheets based on Cell Value||14||27|
|replace blank cells with 0 starting with a specific column until no more data Excel VBA||2||8|
Join the community of 500,000 technology professionals and ask your questions.