Go to Post It's always FIRST season. - Foss@Team176 [more]
Home
Go Back   Chief Delphi > Other > Chit-Chat
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-12-2008, 14:13
indieFan indieFan is offline
RoboDox and LVHS - Missing you!
FRC #5941
Team Role: Engineer
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Seattle (was SoCal, then SA,TX))
Posts: 382
indieFan has a reputation beyond reputeindieFan has a reputation beyond reputeindieFan has a reputation beyond reputeindieFan has a reputation beyond reputeindieFan has a reputation beyond reputeindieFan has a reputation beyond reputeindieFan has a reputation beyond reputeindieFan has a reputation beyond reputeindieFan has a reputation beyond reputeindieFan has a reputation beyond reputeindieFan has a reputation beyond repute
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
Reply With Quote
  #2   Spotlight this post!  
Unread 28-12-2008, 21:37
Ed Law's Avatar
Ed Law Ed Law is offline
Registered User
no team (formerly with 2834)
 
Join Date: Apr 2008
Rookie Year: 2009
Location: Foster City, CA, USA
Posts: 752
Ed Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond repute
Re: VBA - How to put data in cell with macro?

Quote:
Originally Posted by indieFan View Post
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
__________________
Please don't call me Mr. Ed, I am not a talking horse.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pic: See what I put up with? Billfred Extra Discussion 7 21-04-2008 21:03
how to put that light ? Konvicted Electrical 11 20-02-2007 12:51
pic: Green Machine Competition - 10 Cell Fuel Cell Stack Conor Ryan Extra Discussion 18 04-01-2007 08:09
Put pictures with division Wayne Doenges CD Forum Support 1 19-04-2002 14:43
How can I put a picture on my post CMC CD Forum Support 1 04-06-2001 09:26


All times are GMT -5. The time now is 06:53.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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