Hi, I am Starter in Excel Programming

  • Thread starter Thread starter Pardhu
  • Start date Start date
P

Pardhu

Hi , everybody


I am just in to excel vba programming. can any
body give me some small sample programmings. so that i can start
working my self.

Thanks
 
Your best approach is to have a specific problem in mind and seek to solve
that.
 
little code - simply turns a cell color black:


Option Explicit

Sub Pardhu()

Dim wb As Workbook
Dim ws As Worksheet
Dim myRange As Range

Set wb = ActiveWorkbook
Set ws = ActiveSheet
Set myRange = ws.Range("a3")

myRange.Interior.Color = vbBlack

MsgBox "Look! It's black!", vbOKOnly


End Sub


hope it helps
susan
 
My standard reply is to recommend some books, because I have learned that
just turning on the macro recorder does not teach the best way to go about
it. You end up with code that does not have error handling and is hard to
read, maintain, debug, and modify.

I would definitely start with any version of "Excel XXXX Power Programming
with VBA" by John Walkenbach, unless you are using Excel 2007. From what I
hear, the ribbon bar in Excel 2007 is totally different than all previous
versions, so you probably need a book on Excel 2007 if you are using that
version. Otherwise any version of book will do for general VBA programming,
so you could maybe find one at a used book store. Hopefully, a used copy
would still have the CD-ROM in the back!

You might also consider "VBA Developer's Handbook", by Ken Getz and Mike
Gilbert. I have the 1997 edition, and the Introduction contains over 20
pages of an interview the authors did with the Program Manager for the
Visual Basic group at Microsoft. It contains a lot of insights into how VBA
works and is helpful in understanding the history, future and present
details of VBA. It also contains the "Reddick VBA Naming Conventions" in
one of the Appendixes, which is a great way to start using consistent names
for all of your variables. (Makes reading newsgroup posts easier!)

If you do (or plan to do) any significant work with Forms, then a book on
Access, such as "Access 97 Developer's Handbook" by Paul Litwin, Ken Getz,
and Mike Gilbert is also quite handy as a reference.

The Excel programming newsgroup works best after you are a ways up the
learning curve, so you can post a short snippet of code and get some quick
help when you are stuck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top