Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automated data logging with excel
Hello,
I am working on a visual basic project which reads values from an external source and puts those values into an excel worksheet, into pre-defined cells. These values change once every minute. What I would like to do is to write a visual basic program which will take data from sheet 1 and then store it into sheet two. This will happen once a minute. And so for the first reading, the program will take the values from sheet one and write them into row 1 of sheet 2. And for the second reading, it will take the values from sheet one and write them into row 2 of sheet 2, and so on. Also, this program will be taking in a lot of data, and so I would like the sheet to autosave every hour. Can someone help me out with either of these functions? I have a lot of programming experience, though not in visual basic. Please include details. thanks, Andy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automated data logging with excel
hi
as to the data transfer, try something like this.... Private Sub TransferData() Dim r1 As Range Dim r2 As Range Sheet1.Activate Set r1 = Cells(65536, 1).End(xlUp) Set r2 = Sheet2.Cells(65536, 1).End(xlUp).Offset(1, 0) r2.Value = r1.Value r2.Offset(0, 1).Value = r1.Offset(0, 1).Value r2.Offset(0, 2).Value = r1.Offset(0, 2).Value r2.Offset(0, 3).Value = r1.Offset(0, 3).Value 'add more if needed End Sub as to the time of transfer, look up the on time method in vb help or see this site... http://www.cpearson.com/excel/ontime.htm and to the auto save every hour, i'm having trouble with that myself see this site... http://www.mvps.org/dmcritchie/excel/datetime.htm regards FSt1 "Andrew" wrote: Hello, I am working on a visual basic project which reads values from an external source and puts those values into an excel worksheet, into pre-defined cells. These values change once every minute. What I would like to do is to write a visual basic program which will take data from sheet 1 and then store it into sheet two. This will happen once a minute. And so for the first reading, the program will take the values from sheet one and write them into row 1 of sheet 2. And for the second reading, it will take the values from sheet one and write them into row 2 of sheet 2, and so on. Also, this program will be taking in a lot of data, and so I would like the sheet to autosave every hour. Can someone help me out with either of these functions? I have a lot of programming experience, though not in visual basic. Please include details. thanks, Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data logging with excel vba | Excel Programming | |||
Logging data using the same textfile over and over again | Excel Programming | |||
DDE Logging Data Loss in Excel | Excel Discussion (Misc queries) | |||
Live DDE Data Logging | Excel Discussion (Misc queries) | |||
Logging data from a web query | Excel Programming |