Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default BASIC VBA QUESTION

I am trying to learn visual basic for excel . My first program is to
simply add a column of numbers . The numbers are in column c but I
want to put the result of this sum in column A row 10 . This is my
program so far but this will only put the total on the cell that is
highlighted when I run the macro .

Sub test1

Selection . Insert ("=+c4+c5+c7")

End Sub

Again any help is most appreciated and if someone could point me to a
web site for absolute beginners that would be great .

Sincerely Mason
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default BASIC VBA QUESTION

One way:

Option Explicit
sub test2()

with activesheet
.range("a10").formula = "=c4+c5+c7"
end with

end sub

And for your reading pleasure, take a look at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


MASON wrote:

I am trying to learn visual basic for excel . My first program is to
simply add a column of numbers . The numbers are in column c but I
want to put the result of this sum in column A row 10 . This is my
program so far but this will only put the total on the cell that is
highlighted when I run the macro .

Sub test1

Selection . Insert ("=+c4+c5+c7")

End Sub

Again any help is most appreciated and if someone could point me to a
web site for absolute beginners that would be great .

Sincerely Mason


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very basic VBA question. Cerberus Excel Discussion (Misc queries) 1 July 21st 08 04:30 PM
basic question M121385 New Users to Excel 4 May 6th 08 06:22 PM
Basic question...sorry jen the runner Excel Worksheet Functions 11 September 18th 07 12:12 AM
Basic question plittle Excel Discussion (Misc queries) 1 May 23rd 06 03:49 PM
Basic VBA question Henrik[_2_] Excel Programming 2 October 25th 03 12:23 AM


All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"