View Single Post
 
Old 09-01-2018, 03:26 PM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2016
Expert
 
Join Date: Apr 2014
Posts: 947
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

The Filename part is in cell A1 (for example) and that cell contain the likes of: Queen St Roster - and that cell is on the active sheet:

MyFileName = CurrentWB.Path & "\" & Range("A1").value & Format(Now(), "dd-mm-yyyy") & ".csv"

If that cell is on a sheet called, say, Sheet33, then:
MyFileName = CurrentWB.Path & "\" & Sheets("Sheet33").Range("A1").value & Format(Now(), "dd-mm-yyyy") & ".csv"
Reply With Quote