View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
ker_01 ker_01 is offline
external usenet poster
 
Posts: 395
Default Automate Copy and Paste?

This code will add a textbox to 2007 (you'll have to play with the parameters
to make it work how you want, and add the text- I don't have a 2007 box to
tweak it on)

Google to find code snippets that will allow your macro to determine which
version of Excel it is running on, then conditionally run either the 2003
code or this 2007 code.

ActiveSheet.Shapes.AddLabel( _
msoTextOrientationHorizontal, _
ActiveSheet.Range("D5").Left, _
ActiveSheet.Range("D5").Top, _
96.75, _
17.25).Select


With Selection.Font
.Name = "Arial"
.Size = 10
End With


"Quin" wrote:

I get a "Compile Error" when I try to run the code in Excel 2007.

Quin