Solved

reference another worksheet

Posted on 2011-02-12
2
302 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

740 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