I got the following code:
If Cells(1, 2) <> "VERDADEIRO" Then Workbooks.Open myFolder & "\" & strFilename, Local:=True
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("X.xlsx").Activate
Sheets("X").Select
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
ActiveSheet.Paste
else if then cells(3,3)="OK"
end if
Next objFile
It is not working cause it says there is an end if block without the if! All i want it to do is to do all the stuff inside if the cells contains anything except "VERDADEIRO" but if it is "VERDADEIRO" then jump through the stuff inside and put OK.
THANKS!!!!
If Cells(1, 2) <> "VERDADEIRO" Then Workbooks.Open myFolder & "\" & strFilename, Local:=True
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("X.xlsx").Activate
Sheets("X").Select
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
ActiveSheet.Paste
else if then cells(3,3)="OK"
end if
Next objFile
It is not working cause it says there is an end if block without the if! All i want it to do is to do all the stuff inside if the cells contains anything except "VERDADEIRO" but if it is "VERDADEIRO" then jump through the stuff inside and put OK.
THANKS!!!!