The code below pastes clipboard and then stretches the pasted formula. But occasionally I get subscript is out of range error. Why is that?
I use this code for sheet called TOC
HTML Code:
The code below pastes clipboard and then stretches the pasted formula. But occasionally I get subscript is out of range error. Why is that?
I use this code for sheet called TOC
HTML Code:
The only reason I could see for that would be if the active workbook at the time doesn't have a TOC worksheet.
Rory
In all workbooks that I have there is a TOC. I usually copy the clipboard from excel workbook that does not have a TOC sheet. I think, excel confuses workbooks??
The workflow for me is to open two workbooks at the same time and copy from one which does not contain TOC and drop to another one which contains TOC sheet
Appreciate your opinion on this. I have one more code which is as follows:
HTML Code:
If that's being used in a cell formula, it would not cause that error.
Strangely enough when I copy clipboard and click on TOC worksheet and then play the macros from Alt + F11 it works. But not otherwise
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks