Hi,
I have written a code to import data and created a new Excel work sheet. Is it possible to name the sheet`s name instead of the default name (sheet1,sheet2,..)? Here is the part of the code:
Thanks,
Le888
I have written a code to import data and created a new Excel work sheet. Is it possible to name the sheet`s name instead of the default name (sheet1,sheet2,..)? Here is the part of the code:
Code:
Private Sub CmdImportData_Click()
' Create new workbook with three sheets
UserSheets = Application.SheetsInNewWorkbook
Application.SheetsInNewWorkbook = 4
Workbooks.Add
Application.SheetsInNewWorkbook = UserSheets
Open ThisWorkbook.Path & "\matrice.out" For Input As #1
r = 0
c = 0
CurrLine = 0
Set ImpRange = ActiveWorkbook.Sheets(1).Range("A1")
Application.ScreenUpdating = False
...
Thanks,
Le888