madcow200
04-02-2003, 12:18 PM
I need to be able to get data from a random acess file in vb into a template in excel!! Is this possible?? So far i can open the file from excel and put the records iin but it all goes into the first cell in the worksheet. How do i put the desired field in the desired cell???
Urgent help required
Wamphyri
04-02-2003, 01:03 PM
You use Cells(r,c).Value to choose your cells where r is a variable for which row you want to enter data into and c is a variable for the column.
eg. Cellls(r,c).Value = DataRead when r =1 and c = 2 would enter the DataRead into Cell B1
If you need more help post the code that you are using and I'll show you the changes you need to make.
madcow200
04-05-2003, 01:23 AM
Open App.Path & "/ClientDetails.dat" For Random As #1 Len = Len(client)
Open App.Path & "/Dummy file.xls" For Random As #2 Len = Len(client)
numberofrecords = LOF(1) / Len(client)
With xsl
For index = 1 To numberofrecords
recordnumber = 1 + recordnumber
Get #1, recordnumber, client.nameofbusiness
Put #2, recordnumber, client.nameofbusiness
Next index
Close #1
Close #2
Here is the code im using at the moment. I want to be able to out a specifed field in a specifeied cell value?????