And another discussion about clearing Excel
http://forums.aspfree.com/microsoft-...el-413629.html
Need a worksheet object. Try this:
Dim app As New Excel.Application
Dim book As Excel.Workbook
Dim wsht As Excel.Worksheet
Set book = app.Workbooks.Open(txtFileToBeImported, False)
Set wsht = book.Worksheets("Sheet1")
wsht.Cells.Replace What:="""", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
book.Save
app.Quit
Set app = Nothing
Set book = Nothing
Set wsht = Nothing
If you don't know the worksheet name and just want to hit all in the workbook:
For Each wsht In Worksheets
wsht.Cells.Replace What:="""", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Next