Topic
CopyTo Methode
Home page › Community › Automation and VBA › CopyTo method
- This topic has 2 replies and 2 voices and was last updated 19 years, 2 months ago ago by Dennis Reichenbach.
-
AuthorPosts
-
01.03.2006 at 21:48 #34959Dennis ReichenbachParticipant
Hallo,
ich möchte die CopyTo Methode verwenden um eine Formel im RootFolder der aktiven Datenbank zu kopieren und unter einem anderen Namen einzufügen.
Ich habe es mit folgendem Code versucht, bekomme aber immer eine Fehlermeldung.Sub Test()
Dim Verluste_LL As FormulaSet Verluste_LL = ActiveDatabase.RootFolder.Object(“05_1_Verschiebung_V_LL”, fpObjectTypeFormula)
Verluste_LL.CopyTo (ActiveDatabase.RootFolder)Set Verluste_LL = Nothing
End SubKönnen Sie mir weiter helfen?
01.03.2006 at 21:48 #34961Dennis ReichenbachParticipantHallo,
ich möchte die CopyTo Methode verwenden um eine Formel im RootFolder der aktiven Datenbank zu kopieren und unter einem anderen Namen einzufügen.
Ich habe es mit folgendem Code versucht, bekomme aber immer eine Fehlermeldung.Sub Test()
Dim Verluste_LL As FormulaSet Verluste_LL = ActiveDatabase.RootFolder.Object(“05_1_Verschiebung_V_LL”, fpObjectTypeFormula)
Verluste_LL.CopyTo (ActiveDatabase.RootFolder)Set Verluste_LL = Nothing
End SubKönnen Sie mir weiter helfen?
01.03.2006 at 22:02 #34960Bernhard KantzParticipantIf you use a method in VBA without an assignment you have to remove the brackets.
This is not possible in VBA:
[code]
Verluste_LL.CopyTo(ActiveDatabase.RootFolder)
[/code]This code is correct:
[code]
Verluste_LL.CopyTo ActiveDatabase.RootFolder
[/code]
or
[code]
Dim oDestination As Formula
Set oDestination = Verluste_LL.CopyTo(ActiveDatabase.RootFolder)
[/code] -
AuthorPosts
- You must be logged in to reply to this topic.