Results 1 to 5 of 5

VBA script- save file with current filename

Threaded View

  1. #1
    Registered User
    Join Date
    10-19-2011
    Location
    Norwich, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    VBA script- save file with current filename

    Hi guys, I'm sure this is an easy one but I couldn't find anything from searching.

    I want to save the current .csv file and a .txt with the same name. The file type is not problem but I can't find out how to specify the filename as the current filename.

    Thanks in advance for any help,
    James


    EDIT
    This is what I have now but I want "Filename.txt" to be the current workbook filename.
    ActiveWorkbook.SaveAs Filename:= _
    "C:\Users\user\Documents\Emails\5Milla\Full Email File_1.csv_Pieces\Filename.txt" _
    , FileFormat:=xlText, CreateBackup:=False
    Last edited by -James_; 01-06-2012 at 03:45 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1