Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveSheet.Paste error
You can't copy a range with more areas in one time
Try this with Dati.xls open but not active The sheet where you want to copy from is the active sheet Sub test() With Workbooks("Dati.xls").Sheets("Standard") .Unprotect Password:="xxx" ActiveSheet.Range("D:F").Copy .Range("A1") ActiveSheet.Range("I:L").Copy .Range("F1") .Protect Password:="xxx" End With End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Pier" wrote in message ... Hello, i have an error 1004 on Activesheet.Paste, can you explain me the reason? Thanks Columns("D:F").Select Range("D:F,I:L").Select Range("I1").Activate Selection.Copy Windows("Dati.xls").Activate ActiveSheet.Unprotect Password:="xxx" Application.ScreenUpdating = False Range("A1").Select Sheets("Standard").Select ActiveSheet.Unprotect Password:="xxx" Sheets("Standard").Select ActiveSheet.Paste <-------------------------- Range("G1").Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I name a picture as I paste it from VBA? (ActiveSheet.Past. | Excel Discussion (Misc queries) | |||
Activesheet.Paste does OK manually between worksheets but not in M | Excel Discussion (Misc queries) | |||
ActiveSheet.Paste (error) | Excel Worksheet Functions | |||
ActiveSheet.Paste - Error help? | Excel Discussion (Misc queries) | |||
Working with Macros-Activesheet.Paste | Excel Discussion (Misc queries) |