Hallo.
Folgendes Problem:
Vorweg: Läuft alles per Makro.
Ich habe in der dritten Zeile eine Musterzeile mit einigen Formatierungen und Dropdowns etc. Wenn man in einer bestimmten Zelle etwas eingibt soll diese Musterzeile in die aktuelle Zeile kopiert wenn. Das funktioniert auch alles einwandfrei. Nur, wenn ich die Mappe freigebe, werden die Dropdowns nicht mitkopiert.
Ich habe noch eine andere Mappe und in der funktioniert das alles einwandfrei. Mit dem gleichen Stück Code. Deswegen stehe ich voll auf dem Schlauch.
Mal ein bißchen Code:
Das ist die Funktion um die es sich handelt.
For i = 2 To ModGeneral.GetLastColumn(ModGeneral.MAIN_TABLE)
If i <> rTarget.Column Then
Call ModGeneral.ReadSelection(ModGeneral.MAIN_TABLE, 3, i, 3, i)
iLastRow = ModGeneral.GetLastRow(ModGeneral.MAIN_TABLE)
Call ModGeneral.CopySelection(ModGeneral.MAIN_TABLE, iLastRow, i, iLastRow, i)
Else
End If
Next
ReadSelection:
Public Function ReadSelection(ByVal iSheet As Integer, ByVal iStartRow As Integer, ByVal iStartCol As Integer, ByVal iEndRow As Integer, ByVal iEndCol As Integer)
Sheets(iSheet).Select
Range(Cells(iStartRow, iStartCol), Cells(iEndRow, iEndCol)).Select
Selection.Copy
End Function
CopySelection:
Public Function CopySelection(ByVal iSheet As Integer, ByVal iStartRow As Integer, ByVal iStartCol As Integer, ByVal iEndRow As Integer, ByVal iEndCol As Integer)
Sheets(iSheet).Select
Range(Cells(iStartRow, iStartCol), Cells(iEndRow, iEndCol)).Select
Selection.PasteSpecial Paste:=xlPasteAll
End Function
Ich hoffe ihr könnt mir helfen.
Grüsse,
eddi
|