+ Reply to Thread
Results 1 to 5 of 5

Code not working on windows97

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-22-2008
    Location
    S-o-t
    MS-Off Ver
    Office 2000 & 2010
    Posts
    166

    Code not working on windows97

    Hi

    I got this code off here and it works really well on my home pc which is using widows 2000 however i need it for work and they are using windows 97.

    I get an error with the code in red
    I have attached the sheets this refers to, and when i run the code it deletes the dates it matches up with in the master rota sheet which it shouldn't

    Sub ExportIt()
      Workbooks.Open (ThisWorkbook.Path & "\master rota.xls")
      Set outsh = Sheets(ThisWorkbook.Sheets("rota").Range("B4").Value)
      
      ThisWorkbook.Activate
      For Each ce In Range("G6:G50")
        If Not IsEmpty(ce) Then
          Set findit = outsh.Range("G:G").Find(what:=ce.Value)
          For j = 8 To Cells(2, Columns.Count).End(xlToLeft).Column
            outcol = Evaluate("=SUMPRODUCT(('[Master Rota.xls]" & outsh.Name & "'!$2:$2=" & Cells(2, j).Address & ")*('[Master Rota.xls]" & outsh.Name & "'!$3:$3=" & Cells(3, j).Address & ")*COLUMN('[Master Rota.xls]" & outsh.Name & "'!$2:$2))")
            outsh.Cells(findit.Row, outcol).Value = Cells(ce.Row, j).Value
          Next j
        End If
      Next ce
      
    End Sub
    Hope someone can help

    Dave
    Attached Files Attached Files
    Last edited by Dave69rock; 11-21-2008 at 06:47 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    The line is failing because the previous line is resulting in an error value being give to the outcol variable. Check the formula on the previous line.
    Martin

  3. #3
    Forum Contributor
    Join Date
    08-22-2008
    Location
    S-o-t
    MS-Off Ver
    Office 2000 & 2010
    Posts
    166
    Hi Martin

    I didn't write the code someone did it for me from here, i don't really understand the code but like i said it was working on windows2000.

    Could you tell me whats wrong with it

    Dave

  4. #4
    Forum Contributor
    Join Date
    08-22-2008
    Location
    S-o-t
    MS-Off Ver
    Office 2000 & 2010
    Posts
    166
    Hi Martin

    My original post before i got this code may give you a better understanding of what i'm looking for

    Dave

    http://www.excelforum.com/excel-prog...light=transfer

  5. #5
    Forum Contributor
    Join Date
    08-22-2008
    Location
    S-o-t
    MS-Off Ver
    Office 2000 & 2010
    Posts
    166
    Can Anyone Help

    Dave

+ 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