Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

How to learn to write macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raveendiran RR - 10 Apr 2008 15:06 GMT
Hello All,

Can someone tell me the links where i can learn how to write macros - i
would prefer to do simple things with my macro such as copy information from
several sheets to one sheet, find the average,sum..etc of cell values from
different worksheets
Pete_UK - 10 Apr 2008 15:42 GMT
Here's one starting point - scroll down to the bottom of the sheet for
VBA:

http://www.datapigtechnologies.com/ExcelMain.htm

Hope this helps.

Pete

> Hello All,
>
> Can someone tell me the links where i can learn how to write macros - i
> would prefer to do simple things with my macro such as copy information from
> several sheets to one sheet, find the average,sum..etc of cell values from
> different worksheets
Ed from AZ - 10 Apr 2008 16:12 GMT
> Hello All,
>
> Can someone tell me the links where i can learn how to write macros - i
> would prefer to do simple things with my macro such as copy information from
> several sheets to one sheet, find the average,sum..etc of cell values from
> different worksheets

I started by using the macro recorder, then looking at the code to see
what was happening.  In the Visual Basic Editor window where you see
your code, you can set the cursor in any word and press F1 to bring up
the Help file for that term.

Learn to use the Google Groups Search, especially the Advanced
Search.  Chances are your question has already been answered for
someone else, and you can see the answers and often even the code that
solved their problem.

There are several good books for VBA macro programming.  Many people
don't like books because they don't want to have to read and learn
everything - they just want the quick answer to their question.  What
they do not understand is that the quick answer is usually meaningless
unless you know a bit more about what is happening and WHY that is the
answer.

Pick a project - something you would like to make Excel do.  Then
using the macro recorder, the Help files, and the newsgroups, put
together a macro to make it happen.  Step through it using F8.  When
it won't work, get the error message and the line of code that makes
it stop, and post it all back to the newsgroup.  (For macros, I would
recommend using the microsoft.public.excel.programming newsgroup.)

Here's a few links to help you out:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
http://www.xldynamic.com/source/xld.VBAMenu.html
http://www.j-walk.com/ss/index.htm
http://www.mvps.org/links.html#Excel

Have fun!!

Ed
Matthew - 11 Apr 2008 22:31 GMT
Definately - start by recording macros followed by viewing them in the Visual
Basic Editor.  I recommend you try recording the desired actions twice, once
in Absolute References and another time using Relative References.  Once you
do this and swallow the code line by line, (commenting each one as you
review), you will quickly beon your way.  

There really is not too many limitations as to what you can record, copying
and pasting content from 1 sheet to another is quite simple.  One hint, to
reference the very last row of the spreadsheet, I use this a lot -

'Save the very last row number to a variable
iLastRow = activecell.specialcells(xllastcell).row.

I can send you more examples if you like.

> > Hello All,
> >
[quoted text clipped - 36 lines]
>
> Ed

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.