I'm trying to copy and paste from a user selected worksheet in another workbook to a user selected worksheet in the current workbook but I'm getting a mismatch error from the variable I'm using for the worksheet name.
I'm trying to copy and paste from a user selected worksheet in another workbook to a user selected worksheet in the current workbook but I'm getting a mismatch error from the variable I'm using for the worksheet name.
At least crystal clear explain your issue, on which codeline from which code, which variable, …
I get the error on line 15 with the variable rngWeightedChosen
Sheets(rngWeightedChosen).Select
Attachment 627671
The variable seems to have the correct value but is obviously of the wrong type, despite this type working in another Sub.
If the variable content & type are correct - easy to check via the Locals window - so this sheet does not exist in the current workbook …
I’ve found a work around. By changing the worksheet names in the secondary sheet it allows me to use the worksheet reference number rather than the name. I’m not sure why this works but it does. Thanks for your help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks