ilikered100
New Member
- Joined
- May 29, 2013
- Messages
- 46
I'm having trouble with the following code. It works perfectly, except that it adds the name of the parent folder at the beginning of the SaveAs filename.
The SaveAs file name should be "ParsedInfoData.xlsx", but it is saving as "ParsersParsedInfoData.xlsx". The name of the folder these files reside in is "Parsers" which is being added on to the beginning of the file name.
Any idea on how to get it to just Save As "ParsedInfoData.xlsx"
Here's my code:
-------
Sub CreateNewWorkbook()
Dim NewWorkBook As Workbook
Dim folderPath As String
Workbooks("InfoParser.xlsm").Activate
folderPath = ThisWorkbook.Path
Set NewWorkBook = Workbooks.Add
NewWorkBook.SaveAs Filename:=folderPath & "ParsedInfoData.xlsx"
MsgBox "Your Parsed data has been saved in the current folder/directory in which you are working"
End Sub
-----
Thank you,
Carolyn
The SaveAs file name should be "ParsedInfoData.xlsx", but it is saving as "ParsersParsedInfoData.xlsx". The name of the folder these files reside in is "Parsers" which is being added on to the beginning of the file name.
Any idea on how to get it to just Save As "ParsedInfoData.xlsx"
Here's my code:
-------
Sub CreateNewWorkbook()
Dim NewWorkBook As Workbook
Dim folderPath As String
Workbooks("InfoParser.xlsm").Activate
folderPath = ThisWorkbook.Path
Set NewWorkBook = Workbooks.Add
NewWorkBook.SaveAs Filename:=folderPath & "ParsedInfoData.xlsx"
MsgBox "Your Parsed data has been saved in the current folder/directory in which you are working"
End Sub
-----
Thank you,
Carolyn