Diogo Martins
New Member
- Joined
- Jun 5, 2020
- Messages
- 4
- Office Version
- 2019
- 2016
- 2013
- Platform
- Windows
Hello Everyone,
This is my first post so apologies if I have done something wrong.
I have 2 spreadsheets , one for Planning and the other one for daily whereabouts. both mirror themselves and have Data validation fields with lists defined, since when I copy from the planning to the daily whereabouts I get the message saying that I already have the list created on the Daily whereabouts spreadsheet, to avoid this annoyance I decided to create macro that allows me to do a paste special - values and and number formats which does query the data validation lists.
This is the code I get once I record the Macro ( I want to be able to past the data anywhere on the spreadsheet since it works with slots )
Once I try to run the recorded macro I always get the error : Run-time error '1004' PasteSpecial method of range class failed.
Can you please help me with this issue ?
Thanks.
Diogo Martins
This is my first post so apologies if I have done something wrong.
I have 2 spreadsheets , one for Planning and the other one for daily whereabouts. both mirror themselves and have Data validation fields with lists defined, since when I copy from the planning to the daily whereabouts I get the message saying that I already have the list created on the Daily whereabouts spreadsheet, to avoid this annoyance I decided to create macro that allows me to do a paste special - values and and number formats which does query the data validation lists.
This is the code I get once I record the Macro ( I want to be able to past the data anywhere on the spreadsheet since it works with slots )
VBA Code:
Sub PasteBackup()
'
' PasteBackup Macro
'
'
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
End Sub
Once I try to run the recorded macro I always get the error : Run-time error '1004' PasteSpecial method of range class failed.
Can you please help me with this issue ?
Thanks.
Diogo Martins