Q:

How to add a location for saving .svg files generated from an excel macro

I have the following excel VBA macro which saves excel rows as .svg files in bulk. I basically scoured the internet for something that works and found this VBA Macro. I have adapted it to work for me except for selecting the folder to save. I want to define a path where the .svg files should be saved. I noticed it's saving them inside my Documents folder. I need to define the folder but I'm completely unable to figure out how this can be achieved.
Sub SaveRowsAsSVGs()

Dim wb As Excel.Workbook, wbNew As Excel.Workbook
Dim wsSource As Excel.Worksheet, wsTemp As Excel.Worksheet
Dim r As Long, c As Long
Set wsSource = ThisWorkbook.Worksheets("worksheet")

Application.DisplayAlerts = False 'will overwrite existing files without asking

r = 1
Do Until Len(Trim(wsSource.Cells(r, 1).Value)) = 0
ThisWorkbook.Worksheets.Add ThisWorkbook.Worksheets(1)
Set wsTemp = ThisWorkbook.Worksheets(1)

For c = 2 To 7
    wsTemp.Cells((c - 1) * 2 - 1, 1).Value = wsSource.Cells(r, c).Value
Next c

wsTemp.Move
Set wbNew = ActiveWorkbook
Set wsTemp = wbNew.Worksheets(1)
wbNew.SaveAs wsSource.Cells(r, 1).Value & ".svg", xlCSV
wbNew.Close
ThisWorkbook.Activate
r = r + 1
Loop
Application.DisplayAlerts = True
End Sub

A:

From the Workbook.SaveAs documentation:

Parameters:
Filename: A string that indicates the name of the file to be saved. You can include a full path; if you don't, Microsoft Excel saves the file in the current folder.

Change
wbNew.SaveAs wsSource.Cells(r, 1).Value & ".svg", xlCSV

to
Dim myPath as string
myPath = "\...\...\...\" <~ Your path here, ending in a backslash

wbNew.SaveAs myPath & wsSource.Cells(r, 1).Value & ".svg", xlCSV

