I am automating Excel and the Excel Applciation is not visible.
XLRange is an Excel Range object. "|hash|" does not always occur which produces a message that I would rather surpress... "Microsoft Excel Cannot find any data to replace. Check if you search formatting and criteria are defined correctly. If you are sure that matching data exists in this workbook, it may be on a protected sheet. Excel cannot replace data on a protected worksheet."
What if anything can I do to surpress the message?
Thanks.
XLRange is an Excel Range object. "|hash|" does not always occur which produces a message that I would rather surpress... "Microsoft Excel Cannot find any data to replace. Check if you search formatting and criteria are defined correctly. If you are sure that matching data exists in this workbook, it may be on a protected sheet. Excel cannot replace data on a protected worksheet."
Code:
XLRange.Replace What:="|hash|", Replacement:="#", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
What if anything can I do to surpress the message?
Thanks.