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
"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