12-06-2012, 01:02 AM
Excel cell(1,2) has data with blank lines as:
"
vb is hard language.
test data.
test vb.
"
I want to change to without blank lines as "
"vb is hard language.
test data
test vb"
Below code is not working. Please please help.
----------
"
vb is hard language.
test data.
test vb.
"
I want to change to without blank lines as "
"vb is hard language.
test data
test vb"
Below code is not working. Please please help.
----------
Code:
Set ExcelApp = createobject("Excel.Application")
ExcelApp.Visible = True
Dim FilePath
FilePath = "F:\afi\vbscript\Test.xls"
Set ExcFile = ExcelApp.Workbooks.Open (FilePath)
a = ExcelApp.Cells(1,2)
b = Replace(a , " " , "")
ExcelApp.Cells(1,2) = b