We have recently moved from xp to Windows 7. Now my vb code doesn't work.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Trev Schlip

    We have recently moved from xp to Windows 7. Now my vb code doesn't work.

    Before moving to Windows 7 from xp the below code used to work. However, since moving, a prompt box asking if I want to save changes is displayed, AND it doesn't save the changes when I click "Yes" to save changes.

    Is there a setting that needs to be changed?

    Thanks.
    Trev.
    Code:
    Option Explicit
    Dim Wkb As Workbook, FileNom As String
    Dim i As Integer
    Sub TFix()
    Range("a7").Select
    For i = 1 To 40
    Range("a5") = ActiveCell
    FileNom = Range("a4")
    Set Wkb = Workbooks.Open(Filename:=FileNom)
    Sheets("Gen").Select
        Range("K196:o210").FormulaR1C1 = _
            "=IF('Main Page'!R8C4=1,'Generation Input'!R[-51]C+'Generation Input'!R[75]C,'Generation Input'!R[-51]C-'Generation Input'!R[114]C)"    
    Wkb.Close True
    ActiveCell.Offset(1, 0).Select
    Next i
    End Sub
  • 9815402440
    New Member
    • Oct 2007
    • 180

    #2
    vb6 has compatibility issue with win7

    Comment

    Working...