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: 177
Default Weird clipboard behavior

I'm investigating some weird clipboard behavior and came across the
following observation. If I bring up two copies of XL2003 and paste the
following macro into both of them:

Sub main()
Range("a1").Copy
MsgBox "copied " & Range("a1").Value
Range("b1").PasteSpecial xlPasteAll
End Sub

In the first copy of Excel, I type the value "book1" into cell A1 of the
active worksheet. In the second copy of Excel, I type the value "book2"
into cell A1 of the active worksheet.

I then run main on the first copy of Excel. When the MsgBox comes up I run
main in the second copy of Excel. I then click OK on the MsgBox associated
with the second copy of Excel. Cell B1 gets the value "book2" as expected.

If I then click OK on the MsgBox associated with the first copy of Excel,
cell B1 gets no value! Instead it gets a shape object that has a value of
"book2"!!

Very weird.

Does anybody know why the second PasteSpecial works differently?

TIA,

josh


 
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
Weird Links Behavior Jon Oakdale Links and Linking in Excel 5 November 13th 08 08:44 AM
weird macro behavior Dave F Excel Discussion (Misc queries) 0 November 30th 06 03:35 PM
Excel weird behavior [email protected] Excel Discussion (Misc queries) 4 May 25th 06 08:23 PM
Weird Sorting Behavior Jim Thomlinson[_3_] Excel Programming 1 May 4th 05 04:42 AM
Weird behavior of VLOOKUP John Simons Excel Programming 2 April 30th 05 02:21 AM


All times are GMT +1. The time now is 12:33 PM.

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"