Actually it is pretty straight forward ... at least the beginning of
the code. It is only verifying a cell.
Below only part of the code... D10 is 0704 If I single step I get 0704
however if I run it it returns the error the message that it is not
0704 ...
Any idea ???
Many thanks !!!!!!
Option Explicit
Public SourceBook, TargetBook, UpdateBook, BRPBook, DCAPBook,
OldStatusbar, S As String
Public DFC As Boolean
Sub Initialise0704()
Dim i1, i2, rk1, rk2, kl, NbOfRows As Long
Dim R As Range
Dim FileToOpen As Variant
Dim RowInserted As Boolean
Dim Response As String
TargetBook = ActiveWorkbook.Name
' Open new portfoliofile
FileToOpen = Application _
.GetOpenFilename("Excel Files (*.xls), *.xls", , "Select an ER-
Portfolio-file")
If FileToOpen = "" Then
Exit Sub
Else
Workbooks.Open Filename:=FileToOpen
End If
SourceBook = ActiveWorkbook.Name
Sheets(1).Activate
If Range("D10").Value <> "0704" Then
Windows(SourceBook).Close SaveChanges:=False
MsgBox ("This procedure will open SFC0704 events only")
Exit Sub
End If