View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul Wilson[_2_] Paul Wilson[_2_] is offline
external usenet poster
 
Posts: 7
Default Switching workbooks with Personal.xls

Hi,

I have a Personal.xls which I use to store my macros tha I use, this way
enabling them to be used on all workbooks I open.
I now need to edit a macro to open another workbook, copy a range switch
back to the original an paste at the end.
Because the macro is in the Personal.xls it won't switch back to the
original workbook from which I want it pasted into, it wants to go to the
Personal.xls.
The code below is the section where I'm having the problems.

Dim Here As Workbook, There As Workbook
Set Here = ThisWorkbook
Set There = Nothing

Set There = Workbooks.Open(fPath)

There.Activate
Range("A2:K37").Select
Selection.Copy

Here.Activate
Cells(LastCell + 1, 1).Select
ActiveSheet.Paste

Any ideas?

--
Paul Wilson