brian_griffin
New Member
- Joined
- Oct 30, 2012
- Messages
- 7
Hello,
I would like to use a VBA command to copy a specific part (date) of a certain cell in various workbooks.
I have the following code:
Unfortunately, I get the error "-2147221080" with the error description "Automation error".
If I rephrase a part of the code to:
The command is working properly.
Does anyone have an idea that could be wrong with my command?
Thank you very much in advance.
Best
Brian
I would like to use a VBA command to copy a specific part (date) of a certain cell in various workbooks.
I have the following code:
Code:
WBZ.Worksheets(1).Range("G" & WBZ.Worksheets(1).Range("G65536").End(xlUp).Row + 1).Value = Right(WBQ.Worksheets(1).Range("D86").Copy, 4)
Unfortunately, I get the error "-2147221080" with the error description "Automation error".
If I rephrase a part of the code to:
Code:
WBZ.Worksheets(1).Range("G" & WBZ.Worksheets(1).Range("G65536").End(xlUp).Row + 1).Value = 2004
Does anyone have an idea that could be wrong with my command?
Thank you very much in advance.
Best
Brian