Solved

copying into excel from excel

Posted on 2000-05-15
1
153 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

747 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

11 Experts available now in Live!

Get 1:1 Help Now