+ Reply to Thread
Results 1 to 5 of 5

workBook.Saveas

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    8

    workBook.Saveas

    Private Sub CmdSaveWrkBk_Click()
    Application.EnableEvents = False

    Dim fname As String


    fname = "Production" & " " & Sheets("Management Sheet").Range("I4").Value
    ActiveWorkbook.SaveAs Filename:=fname, FileFormat:=52

    Application.EnableEvents = True
    End Sub


    I get error code 1004 why???? please help

  2. #2
    Forum Contributor
    Join Date
    05-04-2012
    Location
    Stamford,Connecticut,USA
    MS-Off Ver
    Excel 2003
    Posts
    105

    Re: workBook.Saveas

    If you are not worry about the file overriding the current file, use this at the begining of the code:
    Application.DisplayAlerts = False

    Then set it back to true at the end

  3. #3
    Registered User
    Join Date
    02-28-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: workBook.Saveas

    Thank you for your response.

    Tried, but still same problem.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: workBook.Saveas

    Duplicate post. Please don't do that.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    02-28-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: workBook.Saveas

    Appologies.......First time user....Still green at this.

+ Reply to Thread

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