dave3009

EFF20220724_GeoJeff

Jul 24th, 2022 (edited)
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub SaveChecking()
  2. '
  3. ' SaveChecking Macro
  4. ' Save this file to 3 different drives
  5. Dim myPaths As Variant
  6. Dim myPath As Variant
  7.    
  8. 'list possible folder path
  9. myPaths = Array("F:\checking\", "G:\checking\", "C:\Users\h4usg int'l\Desktop\checking\")
  10.  
  11. With ThisWorkbook
  12.     'save the current workbook
  13.    .Save
  14.  
  15.     'loop each path and if it exists save the file
  16.    For Each myPath In myPaths
  17.         If Dir(myPath, vbDirectory) <> vbNullString Then
  18.             .SaveCopyAs myPath & "checking.xlsm"
  19.         End If
  20.     Next myPath
  21. End With
  22. End Sub
Add Comment
Please, Sign In to add comment