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
Solved

reference another worksheet

Posted on 2011-02-12
2
300 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
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

809 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