Hallo, Wolfgang Schaible wrote: > while (oSheetFrom.getcellByPosition(0,iRcnt*6).Type <> 0) > for iRcnt2=0 To 4 > copyCellByContent(oSheetFrom.getcellByPosition(0,iRcnt*6+iRnt2), > oSheetTo.getcellByPosition(1,iRcnt)) > next iRcnt2 > iRcnt=iRcnt+1 > wend
Ok;) > und sub (case 0 und 2 optimiert ): NACK: Die while- Abfrage deckt nur den ersten Eintrag ab. Im Block kann ja auch eine Leere Zelle stehen;) >> >| sub copyCellByContent (oFromCell as Object, oToCell as Object) >> >| select case oFromCell.Type >> >| case 2 'zuerst, >> >| oToCell.String = oFromCell.String 'weil häufiger, >> >| case 1 'schneller >> >| oToCell.Value = oFromCell.Value >> >| case 3 >> >| oToCell.Formula = oFromCell.Formula >> >| case 0 >> >| oToCell = "" >> >| end select >> >| end sub > gefällt deinem Schönheitssinn u.U. besser :-) Zugegeben:) Michel -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
