i want to collect data and show in OLE or Excel for every 1 minute. and every data i collect i wan save in a folder. every time i wan update the data. how i should write my program..

Thx for helping me......

A little more info would be really helpful. I'm guessing you are trying to code an auto-save program for excel (I believe it already has an auto-save).

ya.. but i try oredi. i duno how to autosaved.

i try to used MSFlexGdid to put my data every 1 minute and it function. but how i can save my data and update it each time i use it

You need to use a timer control, to do things at a given interval. Do you have a project you can attach?

i know how to detect the data every minute already. now i transfer my data to excel. but how i can see the worksheet when the program is running? i just can saw my data after i close the program and open excel. if i open excel during program is runing, it requires may save the data in different name. but i just want to update the data each time i run the program only. my program is like this:

set x=createobject("excel.application")
with x
.worksheets.open filename:="D\:counter.xls"
.worksheets.("sheet1").activate
.range("A2").select
.range("A2")=txtcounter.text
.workbook.save
.application.quit
end with

how to modify it?

If you only want to see the Excel workbook opened by your program try:

x.visible = True

If you need to change data in your Excel workbook while your program is running you will need to modify your program to close the workbook after each update and then open it again before doing the next update.

You will NOT be able to keep the workbook open in read-write mode in both VB and Excel.

Hope this helps

Happy coding

Yomet

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.