Bryony has attended:
Excel Advanced course
Excel Power Query course
MACRO; DEBUG; ERROR; RANGE
I have created a macro to copy and paste a table from workbook A into workbook B.
I'd like it to
1) open workbook B
2) copy selection from workbook A
3) Paste in B as values
The code looks ok but I keep receiving 'Run-time error '9' Subscript out of range' error message.
I've removed a pw and files are macro enabled. Any ideas what might be prompting this error please?
RE: MACRO; DEBUG; ERROR; RANGE
Hi Bryony,
Thank you for the forum question.
When I run VBA courses I always advice the delegates to stay away from copy and paste using VBA. Copy and paste always give you problems. You should move the data not copy and paste.
I always use an array to do the job.
Sorry I will not be able to advice you, what gives you the error. It can be a lot of things.
If you paste your code here and tell me which line return the error I might be able to help you.
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector