Solved

copying into excel from excel

Posted on 2000-05-15
1
154 Views
Last Modified: 2010-05-02
how can i read in values from a row and column  from another excel workbook and then paste them in my excel workbook?
i also need to know if i want to paste that value in the row and column i want.
0
Comment
Question by:bazukei
1 Comment
 
LVL 1

Accepted Solution

by:
manchula earned 20 total points
ID: 2813276
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSecondBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Dim xlSecondSheet As Excel.Worksheet

Private Sub Command1_Click()
    xlSecondSheet.Cells(1, 5) = xlSheet.Cells(3, 1)
    'Give the row index and col index for Cells. Syntax Cells(RowIndex,ColIndex)

End Sub

Private Sub Form_Load()

Set xlApp = New Excel.Application
Set xlBook = GetObject("c:\temp\test.xls")
Set xlSheet = xlBook.Sheets(1)

Set xlSecondBook = GetObject("c:\temp\test1.xls")
Set xlSecondSheet = xlSecondBook.Sheets(1)

End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now