Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Chit-Chat (http://www.chiefdelphi.com/forums/forumdisplay.php?f=14)
-   -   VBA - How to put data in cell with macro? (http://www.chiefdelphi.com/forums/showthread.php?t=70883)

indieFan 28-12-2008 14:13

VBA - How to put data in cell with macro?
 
I'm a complete novice when it comes to VBA. (I'm currently without anything to do at work, so I'm trying to write a program.)

I'm trying to write a macro code in VBA to open a bunch of files and calculate how many lines are in the file. I then want to write the total number of lines in the cell of the column of a "blank" file. When I've tried to use the line

cells(k,1) = total

I get an "object" error. Can anyone help me?

Thanks,
indieFan

Ed Law 28-12-2008 21:37

Re: VBA - How to put data in cell with macro?
 
Quote:

Originally Posted by indieFan (Post 787661)
I'm a complete novice when it comes to VBA. (I'm currently without anything to do at work, so I'm trying to write a program.)

I'm trying to write a macro code in VBA to open a bunch of files and calculate how many lines are in the file. I then want to write the total number of lines in the cell of the column of a "blank" file. When I've tried to use the line

cells(k,1) = total

I get an "object" error. Can anyone help me?

Thanks,
indieFan

It is not nice that nobody is answering your question, maybe because it has nothing to do with robotics. I am only an intermediate Excel user but you will have better luck asking the question on another forum. That is where I learn all my VBA stuff. The website is www.mrexcel.com. They have over 1.6 million posts there about Excel and VBA. Good luck.

Ed


All times are GMT -5. The time now is 05:01.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi