98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » MACRO; DEBUG; ERROR; RANGE
MACRO; DEBUG; ERROR; RANGE
Resolved · Medium Priority · Version 365
Bryony has attended:
Excel Advanced 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
Wed 15 Jun 2022: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Edit and format multiple worksheets in one operationTo select two or more non-adjacent worksheets, click on the tab of each worksheet, while holding down the [CTRL] key. |