++Hope this is the right forum++
Now Visual Basic In excel is very odd. Its not too hard to get your head around it its just odd when reading and writting Information.
I'm gettnig a Mismatch error when I try to read to read a number form the speardsheet and laod it as a viriable.
Heres the code thats giveing me the error
VB Code:
'Part of the AddRecord() Sub Dim RecordNumber As Long Dim index As Integer Dim DoB As String Dim Num As Long index = 0 Sheets("Data").Select [b]RecordNumber = Range("B2").Value 'This line is giving me the error[/b] Sheets("Enter Data").Select Num = Range("G11:I11").Value If Num = RecordNumber Then Else MsgBox ("You changed the Record Number, this Record has NOT be processed") Sheets("Data Main").Select Exit Sub End If
Can anyone help me with this? I can't think of a reason for it not to work. I've uplaoded the workbook if anyone wants to check in that.
Cheers
--ichar




Reply With Quote