Hello Everyone,
Unable to find a solution for the "subscript is out of range error I am getting.
Does anyone have an Answer for this?Please Login or Register to view this content.
John
Hello Everyone,
Unable to find a solution for the "subscript is out of range error I am getting.
Does anyone have an Answer for this?Please Login or Register to view this content.
John
Last edited by JJFletcher; 04-16-2016 at 12:17 PM.
Do both of those workbooks and their associated "Goals" sheets definitely exist?
If someone has helped you then please add to their Reputation
Are the file names and extensions definitely entered correctly?
BSB
Hi Folks
Thanks for the speedy reply... To answer both of your questions - both workbooks and sheets (Goals) do exist and spelled correctly
John
I have just created two workbooks with the same names as your script suggests and named a sheet in each to "Goals".
Ran the code and it worked fine, unless:
A) The workbook it's pasting into was closed
B) The sheet name is incorrect, i.e. "Goals " with a trailing space
Could either of those be the issue?
BSB
This test was run from the office... I do not received the error here at the house... Identical files and Sheet Names - one question I cannot answer is were both files open at the office during the error - I thought they were both open... I may be incorrect...
Question... I am using Excel 2016 and the Office has 2010 - is it possible that this could be the reason?
Folks... sorry for asking questions without being more prepared.... Consider this issue closed - I will comeback later in the week with an update
John
Last edited by JJFletcher; 04-16-2016 at 12:09 PM.
'm on Excel 2010 here and it worked fine so I wouldn't have thought it was a compatibility issue. Especially not with such simple code as pasting from one file into another.
I would suspect the target file not being open is the culprit here. Try it on your machine with the target workbook closed and see what happens. It will error out because the code above doesn't specify a file path. But I suspect this is a much cut down version of the code.
BSB
BSB,
I did the test and I get the error when the 2016April5Goals.xlsm is closed...
You pose an interesting question for me...If the Workbooks are both on the users desktop is it then required to identify a specific file path? I thought not???
John
Last edited by JJFletcher; 04-16-2016 at 12:14 PM. Reason: spelling
You wouldn't have to specify a path if both workbooks were open at the time of manipulation.
BSB
BSB,
Excellent... I will come back next week and update... Thanks for your time
John
I'm 99.9% sure the target workbook is closed and that's why the code is throwing its toys out of the pram.
Happy to help. Let us know how you get on next week.
BSB
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks