Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Copy /Pastespecial Textboxes

I am using the code below to format a spreadsheet from within Access. After
copying sheet1 I then use pastespecial to remove links to the data on sheet 2
before deleting sheet2. When i use this in 2003 all is well. However, in 2007
the
copy / pastespecial does not appear to copy and paste the data in any
Textboxes on sheet1. Is this the real problem? Why does this occur and how
can i over come the issue? Any info greatfully recieved.


Set xlWb = xlApp.Workbooks.Open(newFileName)
xlApp.Visible = True

' Formats Excel Workbook
Dim xlSheet As Object
Set xlSheet = xlWb.Worksheets("Sheet1")
xlSheet.Cells.Copy
xlSheet.Cells.PasteSpecial Paste:=-4163, Operation:=-4142,
SkipBlanks:=False, Transpose:=False
xlWb.Worksheets("Sheet2").Delete
xlSheet.Select
xlSheet.Range("A1").Select
xlSheet.Protect ("secret")
..........


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy /Pastespecial Textboxes


Text boxes will never be copied in any version of Excel. the boxes are
not part of the worksheet object. Boxes are just a type of shape that
sits ontop of the workksheet and is not part of the worksheet object.

I would also add the Reference in the Access VBA Tool menu for eacel so
you don't have to use the number -4142 and -4143. Go to menu Tools -
Refernce
and add the following library


Microsoft Excel Object 11.0 library (or latest version on your version
of Access)


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157453

Microsoft Office Help

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
Copy/pastespecial error Jon Excel Programming 5 October 29th 07 12:59 PM
Copy and PasteSpecial help chemicals Excel Programming 5 November 9th 06 04:31 PM
Copy Chart and PasteSpecial PCLIVE Charts and Charting in Excel 2 October 26th 06 03:01 PM
Copy PasteSpecial Rob van Gelder[_4_] Excel Programming 1 July 28th 04 07:59 AM
Copy & PasteSpecial Arthur[_3_] Excel Programming 1 November 3rd 03 06:41 PM


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