Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have clicked on all of the links that I can find posted in this forum
trying to learn how to compile VB codes. A lot of the codes mak sense, except for the extra info the gets stuck between lines. Doe anyone know a good webpage that analyzes codes line by line, explainin what each part does? What is the significance of... (Cancel As Boolean) and (By Val SaveAsUI As Boolean, Cancel As Boolean) I see these in codes coming after Private Sub Workbook_BeforePrint Thanks -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the particular instance, Cancel is just a flag that you can set to cancel
printing. In the event procedure, you can test for a particular condition, and cancel the print. As to the rest, you need to practice, read some books, check the NGs, and ask specific questions. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "sowetoddid " wrote in message ... I have clicked on all of the links that I can find posted in this forum, trying to learn how to compile VB codes. A lot of the codes make sense, except for the extra info the gets stuck between lines. Does anyone know a good webpage that analyzes codes line by line, explaining what each part does? What is the significance of... (Cancel As Boolean) and (By Val SaveAsUI As Boolean, Cancel As Boolean) I see these in codes coming after Private Sub Workbook_BeforePrint Thanks. --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mon, 14 Jun 2004 13:44:22 -0500, sowetoddid
wrote: I have clicked on all of the links that I can find posted in this forum, trying to learn how to compile VB codes. A lot of the codes make sense, except for the extra info the gets stuck between lines. Does anyone know a good webpage that analyzes codes line by line, explaining what each part does? No, but then, I never had reason to look. Try Googling for something like: online "visual basic" "lexical analyzer" (with quotes). I doubt you'll find anything, but it's worth a shot. What is the significance of... (Cancel As Boolean) Read Mr. Phillips' msg. and (By Val SaveAsUI As Boolean, Cancel As Boolean) ByVal (one word, not two) makes a copy of the variable (in this case, SaveAsUI - the name is unimportant, BTW - it could just as easily be called X or myDogHasFleas) and passes the copy to the called procedure, instead of the original variable. This prevents the called procedure from altering the original variable. ByVal is not the default behavior - that would be ByRef, which just passes the original variable without making a copy. This allows the called procedure to directly change the variable. (That's a bit simplified, but what I left out would probably just confuse you even more, I bet.) I see these in codes coming after Private Sub Workbook_BeforePrint They're part of the declaration of the sub; they are parameters sent to the procedure and can affect how the procedure operates. You see the same sort of thing with almost all built-in keyword, such as MsgBox: MsgBox (Prompt, Buttons, Title, [etc]) With MsgBox, the parameters can affect what's displayed as the message, what buttons are shown, etc. Now, I hate to be the one to tell you this, but based on your questions, you appear to be unfamiliar with some fundamental concepts of programming, and this really isn't the place to start from scratch. You're far better off coughing up some money for either a book or a class. Microsoft Press (and likely others, but I haven't looked) publishes books specifically about programming MS Office (I have _Microsoft Office 97/Visual Basic Programmer's Guide_; cost me US$34.99 five years ago). Many (most?) colleges offer programming classes; see if your local community college (or whatever) offers a class on programming Visual Basic (but not QBasic or generic BASIC). -- auric underscore underscore at hotmail dot com ***** Custer's Last Photo-Op |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
NG is the newsgroups. I access them via a newsreader, I notice that you
access them via the ExcelForum message boards, same net result. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "sowetoddid " wrote in message ... Thank you, Bob.....what is 'NG'?? --- Message posted from http://www.ExcelForum.com/ |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you both. Your thorough response helped. I do have a book o
excel w/ visual basic, but have not yet had the time to delve into it. I have read the basics, but not enough to generate codes beyond couple of lines -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
learn vba | Excel Discussion (Misc queries) | |||
Where to learn | Excel Discussion (Misc queries) | |||
Learn VB | Excel Discussion (Misc queries) | |||
To learn about VBA | Excel Discussion (Misc queries) | |||
How to learn VBA | Excel Discussion (Misc queries) |