PDA

View Full Version : Syntax error



TheAnswer
11-22-2010, 01:45 AM
If Workbooks("bbca_mgt_report_wip.xls").Worksheets("Vol").Columns("B").Values = Workbooks("BBCA volume report 2010_may_team").Worksheets("Agency 2010").Columns("A:B").Values Then
MsgBox ("yes")
Else
MsgBox ("no")
End If


Can anyone help me solve the error of the sentence in bold? Appreciate all helps.

Bob Phillips
11-22-2010, 01:47 AM
Try Value not Values.

TheAnswer
11-22-2010, 01:51 AM
I tried value and received an error "type mismatch".

Bob Phillips
11-22-2010, 01:57 AM
Just noticed you have columns not Range. You cannoty check all the values in a column like that.

What exactly are you trying to do?