Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Possible bug with clipboard data? - Need Advice

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default Possible bug with clipboard data? - Need Advice

Very interesting! On my machine (Windows ME and Excel 2000 SP-3), your code
works fine, even if I click OK and dismiss the MsgBox so that
Sheets("clipboard") is hidden before I paste into Word!

--
Regards,
Bill Renaud



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Possible bug with clipboard data? - Need Advice

Strange..

I tried on an office 2003 machine and office 2007 machine and both have same
results. When I paste into word, I cant see unless I show hidden text.

I am executing the code from a command button, but I really dont think that
is the issue.

So if it's not the code, and it's not the version of office, I guess it
could be something else within the file?

"Bill Renaud" wrote:

Very interesting! On my machine (Windows ME and Excel 2000 SP-3), your code
works fine, even if I click OK and dismiss the MsgBox so that
Sheets("clipboard") is hidden before I paste into Word!

--
Regards,
Bill Renaud




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default Possible bug with clipboard data? - Need Advice

Does your "clipboard" worksheet have some special cell formatting that
might be causing the problem (i.e. white text on a white background or
pattern)? I had this happen to me once and it took me a little while to
figure out!

--
Regards,
Bill Renaud



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Possible bug with clipboard data? - Need Advice

It's black text on a white background. Its the exact same as the output
worksheet except the logo is smaller and in the bottom right hand corner,
which allows the pasted object to be centered in word or powerpoint by
default.

"Bill Renaud" wrote:

Does your "clipboard" worksheet have some special cell formatting that
might be causing the problem (i.e. white text on a white background or
pattern)? I had this happen to me once and it took me a little while to
figure out!

--
Regards,
Bill Renaud






Reply
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
Sorting Data Advice please Dermot Excel Discussion (Misc queries) 2 March 16th 08 01:35 PM
Transfer clipboard from Task pane clipboard(office?) content to Excel (windows?) clipboard? tskogstrom Excel Programming 2 March 6th 07 12:50 PM
Importing data, and need formatting advice Bob in Charlotte Excel Worksheet Functions 8 December 24th 05 04:56 PM
Need advice : consolidating data from multiple CSV files in Excel - External data handling Matthieu Gaillet Excel Programming 0 December 1st 05 09:02 AM
Moving data from form to spreadsheet + VBA advice psipsi Excel Programming 0 August 30th 05 08:53 AM


All times are GMT +1. The time now is 10:17 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"