Tim Hanson
Member
Hello,
Edit
I did get it to work I updated my code.
Still have small issue, how do you move up out of a folder
tiring
but not working
Thanks
Edit
I did get it to work I updated my code.
Still have small issue, how do you move up out of a folder
tiring
Code:
MyFilePath & "\" & "\..\" & SheetName & ".csv"
Thanks
Code:
Sub SaveNodeAsBook()
Dim SheetName As String
Dim MyFilePath As String
Dim fileName As String
Dim ws As Worksheet
MyFilePath = ThisWorkbook.Path & "\RawDataLinkedIn"
With Application
.ScreenUpdating = False
.DisplayAlerts = False
End With
For Each ws In Worksheets(Array("GephiNodeFile", "GephiEdgeFile"))
SheetName = ws.Name
ws.copy
With ActiveWorkbook
'~save book in this folder
ActiveWorkbook.SaveAs fileName:=MyFilePath & "\" & "\..\" & SheetName & ".csv"
ActiveWorkbook.Close SaveChanges:=True
End With
'~Delete Sheet
' Sheets("SheetName").Select
' ActiveWindow.SelectedSheets.Delete
Next ws
'Sheet1.Activate
End Sub
Last edited: