Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Array to copy from one workbook to another

Hi,

I have an array (and For next loop) which copies specified (by me) named
sheets from a user selected workbook. The bit that I can't get to work is
how do I select the same named sheets from the original array in the "master"
workbook to receive the paste? They need to be selected individually as
there are a series of different ranges being pasted etc. Help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Array to copy from one workbook to another

You may get some helpful answers if you post some of the relevant code and a
clearer explanation.

--

Vasant

"Delboy" wrote in message
...
Hi,

I have an array (and For next loop) which copies specified (by me) named
sheets from a user selected workbook. The bit that I can't get to work is
how do I select the same named sheets from the original array in the

"master"
workbook to receive the paste? They need to be selected individually as
there are a series of different ranges being pasted etc. Help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Array to copy from one workbook to another

Ok here is an exerpt of my code. The first bit works, its the bit when it
selects the "MasterModel" that I need help with. It needs to select the same
sheet in the MasterModel as it has just copied from the "UserModel".

Dim Sh As Worksheet

MasterModel = ActiveWorkbook.Name

[Various other code]

UserModel = ActiveWorkBook.Name

For Each Sh In Sheets(Array("SheetA", "SheetB", "SheetC", "SheetD",
"SheetE", "SheetF"))

StartRng = Range("A10")
EndRng = Range("A8") - 1

FirstRange = "D" & StartRng & ":" & "D" & EndRng
Range(FirstRange).Select
Selection.Copy

Windows(MasterModel).Activate

[How do I select the same sheet as the array to paste the data in eg, first
SheetA, then Sheet B etc]

Range("D15").Select
Selection.PasteSpecial xlPasteValues

Windows(UserModel).Activate
FirstRange = "I" & StartRng & ":" & "AW" & EndRng
Range(FirstRange).Select
Selection.Copy

Windows(MasterModel).Activate

[How do I select the same sheet as the array to paste the data in eg, first
SheetA, then Sheet B etc]

Next Sh

"Vasant Nanavati" wrote:

You may get some helpful answers if you post some of the relevant code and a
clearer explanation.

--

Vasant

"Delboy" wrote in message
...
Hi,

I have an array (and For next loop) which copies specified (by me) named
sheets from a user selected workbook. The bit that I can't get to work is
how do I select the same named sheets from the original array in the

"master"
workbook to receive the paste? They need to be selected individually as
there are a series of different ranges being pasted etc. Help.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Array to copy from one workbook to another

Windows(MasterModel).Activate
Sheets(Sh.Name).Select
Range("D15").Select

etc.

--

Vasant



"Delboy" wrote in message
...
Ok here is an exerpt of my code. The first bit works, its the bit when it
selects the "MasterModel" that I need help with. It needs to select the

same
sheet in the MasterModel as it has just copied from the "UserModel".

Dim Sh As Worksheet

MasterModel = ActiveWorkbook.Name

[Various other code]

UserModel = ActiveWorkBook.Name

For Each Sh In Sheets(Array("SheetA", "SheetB", "SheetC", "SheetD",
"SheetE", "SheetF"))

StartRng = Range("A10")
EndRng = Range("A8") - 1

FirstRange = "D" & StartRng & ":" & "D" & EndRng
Range(FirstRange).Select
Selection.Copy

Windows(MasterModel).Activate

[How do I select the same sheet as the array to paste the data in eg,

first
SheetA, then Sheet B etc]

Range("D15").Select
Selection.PasteSpecial xlPasteValues

Windows(UserModel).Activate
FirstRange = "I" & StartRng & ":" & "AW" & EndRng
Range(FirstRange).Select
Selection.Copy

Windows(MasterModel).Activate

[How do I select the same sheet as the array to paste the data in eg,

first
SheetA, then Sheet B etc]

Next Sh

"Vasant Nanavati" wrote:

You may get some helpful answers if you post some of the relevant code

and a
clearer explanation.

--

Vasant

"Delboy" wrote in message
...
Hi,

I have an array (and For next loop) which copies specified (by me)

named
sheets from a user selected workbook. The bit that I can't get to

work is
how do I select the same named sheets from the original array in the

"master"
workbook to receive the paste? They need to be selected individually

as
there are a series of different ranges being pasted etc. 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
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook Ruchir Excel Worksheet Functions 1 July 25th 08 07:29 AM
Excel-how to link source workbook to copy of destination workbook D Lynn Excel Worksheet Functions 1 May 29th 08 05:36 PM
Copy cells based on conditions in one workbook to another workbook fLiPMoD£ Excel Worksheet Functions 0 August 1st 07 07:43 PM
Copy Array pointer rather than entire array R Avery Excel Programming 2 August 24th 04 08:28 PM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM


All times are GMT +1. The time now is 12:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"