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.
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
Comment