Unable to paste copied cells when the sheet is hidden.

kornie_jon

New Member
Joined
Nov 5, 2018
Messages
2
Hello,
I have written some VBA code to copy cells from a "hidden" Sheet 3 when I click a "Form Controls" button on Sheet 2. Sheet 3 remains hidden, the information copies to the clipboard and I am able to past the information into Notepad or a blank Excel Workbook as a test. The problem is when I attempt to paste the information into a field within SharePoint, it will only paste if Sheet 3 is un-hidden when attempting to paste. Any ideas of what I can do to make this work?


Sub Complete_Orders_button()

Sheet3.Range("Complete_Orders").Copy

End Sub

<tbody>
</tbody>
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
turn application screen updating off, unhide the sheet, copy paste, hide the sheet, turn application screen updating back on.
 
Upvote 0
Thank you for the reply. That screen updating off code helped with another project, thank you...

For this issue - it's the copy to paste step. Because I am pasting into a SharePoint outside of the Excel workbook, the macro moves past and hides the sheet before anything is pasted. This results in the same issue, the information is on the clipboard and I can paste it into a blank Excel sheet or onto Notepad but it will not past into SharePoint. Is there a code to hold, recognize that the information has been pasted and then continue the macro?
 
Upvote 0
it's actually simpler than you realize. had a similar issue recently where I needed a macro to not continue. make your sub, unhide, copy, paste, (create a secondary sub and CALL it after the paste that hides things back to how you want them), end sub let me know if that works, don't have sharepoint to test it out but it should fix the issue.
 
Upvote 0

Forum statistics

Threads
1,216,105
Messages
6,128,859
Members
449,472
Latest member
ebc9

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top