kalcerro_1
New Member
- Joined
- Feb 28, 2020
- Messages
- 27
- Office Version
- 365
- Platform
- Windows
Hello,
I'm adding this new sheet to my workbook and giving a specific name to the new sheet. I would like to know how can I protect the creation of a new sheet after this one is already working.
Also, I would like to add to the code the function to only open .csv files, is this possible?
I tried to record the option from data tab in excel but there's an error every time I tried to record the function.
I'm adding this new sheet to my workbook and giving a specific name to the new sheet. I would like to know how can I protect the creation of a new sheet after this one is already working.
Also, I would like to add to the code the function to only open .csv files, is this possible?
I tried to record the option from data tab in excel but there's an error every time I tried to record the function.
VBA Code:
Private Sub CommandButton1_Click()
Dim getfilename As String
getfilename = Application.GetOpenFilename()
Sheets.Add(After:=Sheets("3. Sheet2")).Name = "4. Result"
End Sub