Hallo Vera,

Vera Unverzagt wrote:
> Michelino Caroselli wrote:
(BTW: Du könntest die Einleitungszeile stehen lassen.)

> Den Dispatcher habe ich genommen, weil ich mir da keine Gedanken machen 
> mußte, welche Werte in der Ausgangstabelle stehen, also ob in Zelle 1 
> eine Zahl oder Text steht.
> Das Ganze passiert nämlich bei unterschiedlichen Abfragen.

Ok. Es las sich so, als ob das eine einmalige Angelegenheit wäre, daher Q&D.

> Aber ich kann es ja mal mit erst Zellenformat auslesen versuchen.
> Hm. Macht den Code aber auch nicht übersichtlicher (Jedenfalls bestimmt 
> nicht bei mir ;-).

Ändere/ Erweitere mal das Makro folgendermaßen:

>|   while (oSheetFrom.getcellByPosition(0,iCounter*6).Type <> 0)
>|     copyCellByContent(oSheetFrom.getcellByPosition(0,iCounter*6), 
>oSheetTo.getcellByPosition(0,iCounter))
>|     copyCellByContent(oSheetFrom.getcellByPosition(0,iCounter*6+1), 
>oSheetTo.getcellByPosition(1,iCounter))
>|     copyCellByContent(oSheetFrom.getcellByPosition(0,iCounter*6+2), 
>oSheetTo.getcellByPosition(2,iCounter))
>|     copyCellByContent(oSheetFrom.getcellByPosition(0,iCounter*6+3), 
>oSheetTo.getcellByPosition(3,iCounter))
>|     copyCellByContent(oSheetFrom.getcellByPosition(0,iCounter*6+4), 
>oSheetTo.getcellByPosition(4,iCounter))
>|     iCounter = iCounter + 1
>|   wend
> 
>| end sub
> 
>| sub copyCellByContent (oFromCell as Object, oToCell as Object)
>|   select case oFromCell.Type
>|     case 0
>|       oToCell = ""
>|     case 1
>|       oToCell.Value = oFromCell.Value
>|     case 2
>|       oToCell.String = oFromCell.String
>|     case 3
>|       oToCell.Formula = oFromCell.Formula
>|   end select
>| end sub

Wobei 'Case 3' ziemlich sinnfrei ist (außer du hast da Formeln, welche
sich nur auf Namen und/oder Konstanten beziehen;).

> Vielen Dank.
> Ich melde mich, ob ich das geschafft habe. ;-)
Gerne.


HTH und Gruß, Michel
-- 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Antwort per Email an