create new worksheet excel visual basic

The solution for “create new worksheet excel visual basic” can be found here. The following code will assist you in solving the problem.

Imports Excel = Microsoft.Office.Interop.Excel

Dim ExcelApp As New Excel.Application
Dim ExcelWorkBook As Excel.Workbook
Dim ExcelWorkSheet As Excel.Worksheet

ExcelApp.Workbooks.Open(“ExcelFileName”)
ExcelWorkBook = ExcelApp.ActiveWorkbook

PreviousSheetName = ExcelWorkBook.Sheets(ExcelWorkBook.Sheets.Count).Name

ExcelWorkBook.Sheets.Add(After:=ExcelWorkBook.Sheets(PreviousSheetName)).Name = “New Sheet Name”

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts