Results 1 to 3 of 3

Error in Filename when saving

Threaded View

  1. #1
    Registered User
    Join Date
    06-10-2009
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    46

    Error in Filename when saving

    Hi,

    I have a problem with the following code

    CW = CLng(InputBox("Please enter the current week (1-53)", "week"))
        Dim Savepath
        Dim dat4
        Set dat4 = Application.FileDialog(msoFileDialogFolderPicker)
        With dat4
        .Title = "Select Savepath"
        .InitialFileName = "J:\c_public\_events this month"
                  If .Show = -1 Then
                     Savepath = .SelectedItems(1)
                 End If
        End With
        ActiveWorkbook.SaveAs Filename = Savepath & "\events_week" & CW & ".xls"
    The File is named "False.xls" in the correct folder. Does anyone know, how to get the name to be "events_week37.xls"?
    Last edited by RoyMakaay1985; 09-11-2009 at 09:07 AM.

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