Solved

reference another worksheet

Posted on 2011-02-12
2
303 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

732 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