' on top of your code, you could
public saveName As String
saveName = ActiveWorkbook.Name
'then later upon saving do
ActiveWorkbook.SaveAs Filename:="H:\My Documents\Ny Kalkuleringsmal\CSV\" & saveName & ".txt" _
, FileFormat:=xlCSV, CreateBackup:=False
in your example; it would be something like :
public saveName as string
sub yoursubname()
With Ark1 ' change to the codename for "Eksport"
.Visible = xlSheetVisible
.Copy
.VPageBreaks = xlSheetVeryHidden
End With
ActiveWorkbook.SaveAs Filename:="H:\My Documents\Ny Kalkuleringsmal\CSV\" & saveName & ".txt" _
, FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close
end sub
Bookmarks