How to use Excel workbook.saveas with automatic overwrite

excelObject.DisplayAlerts = False

Set excelObject = CreateObject("Excel.Application")    
excelObject.DisplayAlerts = False
Set wb = excelObject.Workbooks.Add
fullFilePath = importFolderPath & "\" & "A.xlsx"

wb.SaveAs fullFilePath, AccessMode:=xlExclusive,ConflictResolution:=Excel.XlSaveConflictResolution.xlLocalSessionChanges    
wb.Close (True)

 

 

 

https://stackoverflow.com/questions/14634453/how-to-use-workbook-saveas-with-automatic-overwrite

Advertisements

Hide the extra row at the bottom in a DataGridview in a Winform Application

this.dataGridView.AllowUserToAddRows = false;

https://stackoverflow.com/questions/4212432/hide-the-extra-row-at-the-bottom-in-a-datagridview-in-a-winform-application