Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to Learn VB

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Trying to Learn VB

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to Learn VB

Thank you, Bob.....what is 'NG'?

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Trying to Learn VB

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/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to Learn VB

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 538
Default Trying to Learn VB

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
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
learn vba vinod9111 Excel Discussion (Misc queries) 4 August 3rd 09 01:31 PM
Where to learn AFranco Excel Discussion (Misc queries) 11 March 11th 09 08:03 PM
Learn VB Suleman[_2_] Excel Discussion (Misc queries) 2 May 4th 08 05:11 PM
To learn about VBA Morrigan Excel Discussion (Misc queries) 3 August 9th 05 02:33 PM
How to learn VBA Thrava Excel Discussion (Misc queries) 3 January 8th 05 12:43 AM


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

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

About Us

"It's about Microsoft Excel"