Results 1 to 1 of 1

Why won't this routine run?

Threaded View

  1. #1
    Registered User
    Join Date
    02-06-2009
    Location
    Washington, DC, USA
    MS-Off Ver
    Excel 2010
    Posts
    49

    Why won't this routine run?

    I can step through this routine, but when I try running it from Janaury 2009.xls it stops.

    Sub CopyNew()
    Workbooks.Open ("S:\shared\FORECAST\FmIncome\MTED Tables\Jan2009\WHEAT.xls")
     
     For i = 1 To 7
       For j = 1 To 2
         Workbooks("WHEAT.xls").Activate
           nwval = 0
             If Range("NewData").Cells(i, j).Value > 0 Then
                Set nwval = Range("NewData").Cells(i, j)
             End If
         If nwval > 0 Then
            Workbooks("January 2009.xls").Activate
            Range("DATA_WT").Cells(i, j) = nwval 
         End If
       Next j
     Next i
     End Sub
    Last edited by cmcgath; 02-17-2009 at 04:56 PM. Reason: Did not wrap code properly. Sorry; I really am a novice.

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