13,825
社区成员
发帖
与我相关
我的任务
分享
String keyword = "aaa";
Variant range = sheet.OlePropertyGet("Cells").OleFunction("Find",
WideString(keyword),
excelApp.OlePropertyGet("ActiveCell"), // After:=ActiveCell,
-4163, // LookIn:=xlValues,
2, // LookAt:=xlPart,
1, // SearchOrder:=xlByRows,
1, // SearchDirection:=xlNext,
false, // MatchCase:=False,
false, // MatchByte:=False,
false // SearchFormat:=False
);
if (range.pdispVal) // 有效但是感觉不专业
{
range.OleFunction("Activate");
}
else
Caption = "Empty";