C
Confused Slug
I am using the code below to format a spreadsheet from 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")
..........
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")
..........