Avatar of Fritz Paul
Fritz PaulFlag for South Africa

asked on 

How to Copy range in another workbook to present position in active workbook

I have a workbook, Book1,  with a range of cells which I want to copy to the active workbook, Book2, in the present position.
Both workbooks are open, but Book2 is active and the active cell is already determined by VBA.
I prefer that the focus does not shift to the source workbook, but only refer to the range in that workbook.
I want to use VBA. Can you help with the code please.
Microsoft Excel

Avatar of undefined
Last Comment
Fritz Paul
Avatar of Jacques Geday
Jacques Geday
Flag of Canada image

What do you mean by 'present position' ??
gowflow
if WS1 is workbook1 Sheet1 and WS2 is workbook2 Sheet1 or any sheet then to copy say range A1:B6 in Book1 then

WS1.range("A1:B6").copy WS2.activecell

will copy the Range A!:B6 fm Book1 to the Activecell in Book2

gowflow
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Fritz Paul
Fritz Paul
Flag of South Africa image

ASKER

Thanks!
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo