Solved

reference another worksheet

Posted on 2011-02-12
2
310 Views
Last Modified: 2012-05-11
I am using VBA to manipulate two worksheet1 and worksheet2.
If my worksheet2 is active now and I need to execute the following code on worksheet1 how do I write it in VBA?

   Rows("14:14").Select
    Application.CutCopyMode = False
    Selection.Copy
    Rows("16:16").Select
    ActiveSheet.Paste

0
Comment
Question by:tommym121
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 50

Accepted Solution

by:
Dave Brett earned 500 total points
ID: 34880763
hth

Dave
Sub Copy()
Sheets(1).Rows(14).Copy Sheets(1).Rows(16)
End Sub

Open in new window

0
 

Author Closing Comment

by:tommym121
ID: 34880812
Thanks.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question