Re: Colon in code?
- From: "davegb" <davegb@xxxxxxxxxxxxxx>
- Date: 13 Jan 2006 08:09:53 -0800
George Nicholson wrote:
> In this case, I suspect "Hide:" is a line label (Colons can also be used to
> separate multi commands on a single line, but that doesn't seem to be the
> case here). There is probably a "GoTo Hide" instruction somewhere in the
> same function/procedure where you found it (if there isn't, there probably
> was one at some point in time and someone simply forgot to take the
> corresponding label out.)
>
> Use of line labels and goto's is (generally) frowned upon (outside of Error
> trapping where they are a necessity). This has become one of those "rules to
> be broken" because improper/overuse of them is an very easy trap for newbie
> coders to fall into since there is (almost) always a better way to achieve
> the same results. Extreme caution is advised or you could quickly end up
> with "spaghetti code" that jumps all over the place: something totally
> unreadable & unmanageable, even if you wrote it yourself yesterday.
>
> "Line labels" doesn't warrant an entry in Help, but you can get to a
> hyperlink definition of them via the entry for the "GoTo" statement.
>
> Let's be careful out there...
>
> HTH,
> --
> George Nicholson
>
> Remove 'Junk' from return address.
>
>
> "davegb" <davegb@xxxxxxxxxxxxxx> wrote in message
> news:1137107867.468758.184340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > What does a colon in VBA code do? I.e.,
> >
> > Hide:
> >
> > I tried to figure out how to look this up both online and in
> > Walkenbach, but couldn't find anything on it.
> > Thanks.
> >
Thanks for all your replys!
.
- References:
- Colon in code?
- From: davegb
- Re: Colon in code?
- From: George Nicholson
- Colon in code?
- Prev by Date: Re: Macro again..
- Next by Date: Re: Macro to name ranges for selected worksheets
- Previous by thread: Re: Colon in code?
- Next by thread: VBA
- Index(es):
Relevant Pages
|