Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need a point in the right direction.
I've got a series of workbooks that I need to paste a specific table into on an activesheet. The table is located in the personal.xls file which I've given it a name (let's call it..... table.to.insert) All I want to achieve is with the activesheet I'm on. unprotect the sheet, copy (table.to.insert) and paste it the active sheet in the range B24. I tried recording a macro and manipulate it but I couldn't get it to copy from the personal.xls file into another worksheet. I've even tried having the table in a seperate worksheet (closed) but that didn't work out as planned either. Trying to simplify it. Source: table.to.insert (can be located anywhere, doesn't have to be personal.xls) Target: activesheet | range B24 Copy from source, go to activesheet, unprotect, paste and retain everything. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub testme() Dim RngToCopy As Range Dim DestCell As Range Set RngToCopy = Workbooks("Personal.xls").Worksheets("somesheetnam ehere") _ .Range("table.to.insert") Set DestCell = ActiveSheet.Range("B24") With DestCell .Parent.Unprotect RngToCopy.Copy _ Destination:=.Cells .Parent.Protect End With End Sub Forgone wrote: I need a point in the right direction. I've got a series of workbooks that I need to paste a specific table into on an activesheet. The table is located in the personal.xls file which I've given it a name (let's call it..... table.to.insert) All I want to achieve is with the activesheet I'm on. unprotect the sheet, copy (table.to.insert) and paste it the active sheet in the range B24. I tried recording a macro and manipulate it but I couldn't get it to copy from the personal.xls file into another worksheet. I've even tried having the table in a seperate worksheet (closed) but that didn't work out as planned either. Trying to simplify it. Source: table.to.insert (can be located anywhere, doesn't have to be personal.xls) Target: activesheet | range B24 Copy from source, go to activesheet, unprotect, paste and retain everything. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 25, 9:43*pm, Dave Peterson wrote:
Option Explicit Sub testme() * * Dim RngToCopy As Range * * Dim DestCell As Range * * Set RngToCopy = Workbooks("Personal.xls").Worksheets("somesheetnam ehere") _ * * * * * * * * * * * .Range("table.to.insert") * * Set DestCell = ActiveSheet.Range("B24") * * With DestCell * * * * .Parent.Unprotect * * * * RngToCopy.Copy _ * * * * * * Destination:=.Cells * * * * .Parent.Protect * * End With End Sub Forgone wrote: I need a point in the right direction. I've got a series of workbooks that I need to paste a specific table into on an activesheet. *The table is located in the personal.xls file which I've given it a name (let's call it..... table.to.insert) All I want to achieve is with the activesheet I'm on. unprotect the sheet, copy (table.to.insert) and paste it the active sheet in the range B24. I tried recording a macro and manipulate it but I couldn't get it to copy from the personal.xls file into another worksheet. *I've even tried having the table in a seperate worksheet (closed) but that didn't work out as planned either. Trying to simplify it. Source: table.to.insert (can be located anywhere, doesn't have to be personal.xls) Target: activesheet | range B24 Copy from source, go to activesheet, unprotect, paste and retain everything. -- Dave Peterson- Hide quoted text - - Show quoted text - Fantastic... thanks heaps...... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert new Worksheet with name, and insert the sheet into itsalphabetical / numerical location | Excel Programming | |||
Always print to a specific location | Excel Discussion (Misc queries) | |||
Saving to a specific location | Excel Programming | |||
Save to specific location | Excel Discussion (Misc queries) | |||
Need help in calculation at specific location | Excel Worksheet Functions |