Find and Replace Excel Code Stage

Fletchers14

New Member
I am trying to implement a "Find and Replace" code stage within my Blue Prism Excel Object. The code stage is producing an error with:
"Internal : Could not execute code stage: Parameter count mismatch."
Any help would be much appreciated
The Inputs are as follows: Handle Workbook Worksheet ReplaceWhat Replacement Reference
Outputs: Success Message
Here is my code Stage:
Dim excel, sheet, range As Object

Try

wb = GetWorkbook(Handle, Workbook)
ws = GetWorksheet(Handle, Workbook, Worksheet)

wb.Activate()
ws.Activate()
excel = ws.Application
sheet = excel.ActiveSheet
range = sheet.Range(Reference)
Range.Replace(ReplaceWhat, Replacement)

Success = True

Catch e As exception
Success = False
Message = e.Message()
Finally
wb = Nothing
ws = Nothing
End Try
 

Aniteja

New Member
The Inputs are as follows: Handle, workbookname, worksheetname, ReplaceWhat, ReplacementReference
Outputs: Success, message

Dim wb, ws As Object

Try
wb = GetWorkbook(handle, workbookname)
ws = GetWorksheet(handle, workbookname, worksheetname)

ws.UsedRange.Replace(ReplaceWhat, ReplacemetnReference, , , , , , )
Success=true

Catch e As exception
Success=false
message = e.Message

Finally
wb = Nothing
ws = Nothing
End Try
 
Top