LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Selection.Copy on Temporarily unhidden excel sheet - possible bug?

I have an excel workbook that has 3 worksheets (Input, Output, Clipboard)

Input is the only visible sheet and is used to input the variables.
Output is used for spawning a new excel sheet with a customized view.
Clipboard is used for when copying the data into word or another application.

My code looks like this:

Sub clipcopy()
'Copies the output sheet to clipboard so a user can paste into Powerpoint or
Word
Application.ScreenUpdating = False
Sheets("clipboard").Visible = True
Sheets("clipboard").Select
Range("A1:D18").Select
Selection.Copy
Sheets("Input").Activate
Application.ScreenUpdating = True
MsgBox ("The sheet is copied to the clipboard." & vbCrLf & vbCrLf & "Keep
this window open until you have finished pasting into another application.")
Sheets("clipboard").Visible = False

The problem is if you close the msgbox window and try to paste into word it
pastes as hidden text.

If you keep the msgbox open and paste into word it pastes normally.

This works but seems a bit messy to me. Is there another way I could
accomplish? Apparently when Sheets("clipboard").Visible = False is set, it
also affects whats already in the clipboard.

Thanks for any help you can provide, and if you would like a copy of the
file let me know.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[newbie] copy unhidden cells Jon Excel Discussion (Misc queries) 1 April 2nd 09 05:09 PM
Copy Just UnHidden? Dave Birley Excel Programming 3 February 22nd 08 08:45 PM
How do I temporarily disable hyperlinks in an excel sheet? looloof Setting up and Configuration of Excel 1 December 2nd 07 01:47 PM
How do I copy only the unhidden rows/colums? Tsae0c Excel Discussion (Misc queries) 2 March 7th 07 05:36 PM
copy and paste only unhidden information heatherB Excel Discussion (Misc queries) 2 September 13th 05 03:34 PM


All times are GMT +1. The time now is 01:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"