Hi again BB
It's your Wednesday afternoon virus now :-)
Just trying to wade my way through the Basic code from my recorded macro.
loExcel = CREATEOBJECT([Excel.Application])
Wait WINDOW "Opening HTML File ..." NOWAIT NOCLEAR
With loExcel
.Workbooks.Open( "R:\OPDATA\Essex\SM_Coaches\APR06\sm coaches disk.htm")
Wait WINDOW "Saving as Excel Spreadsheet ..." NOWAIT NOCLEAR
.ActiveWorkBook.SaveAs("Test.XLS", xlNormal)
Wait CLEAR
.Rows("1:4").Select
.selection.
.Selection.FormatConditions.Delete
.Columns("C:C").Select
.Selection.FormatConditions.Delete
In the above lines (note I've commented out the With .activesheet line - so now I'm getting further).
I can't seem to get Intellisense to react to my code and so am flying pretty blind.
When I issue the ".ActiveWorkBook.SaveAs("Test.XLS", xlNormal)" I get an "OLE dispatch error - cannot access Test.xls"
When I issue ".Selection.Delete Shift=xlToLeft" I get "Syntax error" - obviously, as I don't know the translation.
Same with ".Selection.Insert Shift=xlToRight"
I wonder if you could put me right on the syntax (beware, I'll probably be back for more once I've got thses simpler commands out of the way).
BTW, all these actions are taking place "in the dark" so to speak, as no visible file is produced - no spreadsheet, either in HTML or XLS form.
Thanks
Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.