Hello,
I want to create object which will replace charecters using ASCII Characters as arguments. I need this object to delete all line breaks in excel file ( Chr(10)).
My code stage does not work when I use ASCII characters:
range.Replace(Chr(115), Chr(100))
It works when I use strings:
range.Replace("s", "d")
Do you know how to create object to replace values using ASCII characters or how to delete all line breaks in excel sheet?
Chr(115) = "s"
Chr(100) = "d"
THE WHOLE CODE
Dim wb, excel, range As ObjectDim wb, excel, range As Object
Try
wb = GetWorkbook(Handle, Workbook)
excel = wb.Application
range = excel.Selection
'range.Replace("s", "d")
range.Replace(Chr(115), Chr(100))
Success = True
Catch e As Exception
Success = False
Message = e.Message
Finally
wb = Nothing
excel = Nothing
range = Nothing
End Try
Thank you for your help
------------------------------
Mateusz Wojcik
RPA Programist
Rockwell Automation
Europe/Warsaw
------------------------------