Hello,
I have written a program to rename files using excel data: Title of Artwork - Price (Copies columns B & G)
Is there a way I can return the price in currency format, i.e., return by thousands separator?
Capture1.JPG
'Copies/Renames files from column B & G. Need thousands format.
Option Explicit
Sub CopyRenameFilePrice()
Dim src As String, dst As String, fl As String
Dim rfl As String
Dim lngMyRow As Long
Dim lngLastRow As Long
Application.ScreenUpdating = False
lngLastRow = Range("A:E").Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).row + 1
'Source directory
src = "J:\My Art Work\UncategorizedArtWork\TitledArtWork"
'Destination directory
dst = "C:\Users\felizm\Desktop\temp"
For lngMyRow = 2 To lngLastRow
'File Name
fl = Range("A" & lngMyRow)
'Rename File
rfl = Range("B" & lngMyRow) & " - " & "$" & Range("G" & lngMyRow) & ".00"
On Error Resume Next
FileCopy src & "\" & fl, dst & "\" & rfl & ".jpg"
On Error GoTo 0
Next lngMyRow
Application.ScreenUpdating = True
MsgBox "Done"
End Sub
Thank you very much.
Bookmarks