Results 1 to 1 of 1

Run Time Error 9

Threaded View

NissanX Run Time Error 9 08-21-2012, 04:48 PM
  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    10

    Run Time Error 9

    I am getting a "Run Time Error 9" with the following script when I go to Activate the new spreadsheet that is being created.

       Application.DisplayAlerts = False
        Set NewBook = Workbooks.Add
        With NewBook
        .Title = "Pipeline Sales Data"
        .Subject = "Pipeline Sales Data"
        .SaveAs Filename:="Pipeline Sales Data"
        
        End With
        Windows("Pipeline Sales Dashboard.xlsx").Activate
        Windows("Macro.xlsm").Activate
        Range("A4:I40").Select
        Selection.Copy
        Windows("Pipeline Sales Data.xlsx").Activate    Range("A3").Select
        ActiveSheet.Paste
        Cells.Select
        Cells.EntireColumn.AutoFit
        Sheets("Sheet1").Select
        Sheets("Sheet1").Name = "Pivot"
        Sheets("Sheet2").Select
        Windows("Pipeline Sales Dashboard.xlsx").Activate
        Windows("Macro.xlsm").Activate
        Application.CutCopyMode = False
        Sheets("Data").Select
        Cells.Select
        Selection.Copy
        Windows("Pipeline Sales Data").Activate
    Last edited by jeffreybrown; 08-21-2012 at 05:40 PM. Reason: Please use code tags when posting code

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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