Dear ALL
is it possible to add to the below code a step that will also save to the users desktop. I have replaced the current location with XX just for privacy purposes.
Public Sub MASSUPLOAD()
Dim newWb As Workbook
Dim wbConn As WorkbookConnection
Dim wbQuery As WorkbookQuery
Dim links As Variant, i As Long
ThisWorkbook.Worksheets(Array("Patient Fields", "Sheet1")).Copy
Set newWb = ActiveWorkbook
'Delete workbook connections
For Each wbConn In newWb.Connections
wbConn.Delete
Next
'Delete workbook queries
For Each wbQuery In newWb.Queries
wbQuery.Delete
Next
'Delete Excel links
'links = newWb.LinkSources(xlExcelLinks)
'If links <> Empty Then
' For i = 1 To UBound(links)
' newWb.BreakLink links(i), xlLinkTypeExcelLinks
' Next
'End If
Worksheets(Array("Patient Fields")).Select
Range("A3").Select
ActiveSheet.Shapes.Range(Array("Rectangle: Rounded Corners 2")).Select '
Selection.Delete
Selection.Cut
Application.DisplayAlerts = False 'suppress warning message displayed if new workbook already exists
newWb.SaveAs "XXXXX/" & "\" & "XXXX_" & Format$(Now(), "YYmmdd_hhmmss") & ".xlsx", FileFormat:=xlOpenXMLWorkbook
Application.DisplayAlerts = True
newWb.Close False
End Sub
Bookmarks