PC Review


Reply
Thread Tools Rate Thread

Dimmed Keyword as Variable

 
 
Zone
Guest
Posts: n/a
 
      15th Dec 2006
I stupidly dimmed keyword Val as a variant in a userform, type variant,
like this:

Dim HAL, VAL

Now, in every module that Val appears, it as appears as VAL. Yikes! I
found the Dim statement as changed it to

Dim HAL, VVAL

but all the Val statements in other modules still show as VAL.
Obviously, VAL was not dimmed as public, so I don't know why this is
happening! How do I get the VAL in the other modules to return to
their normal capitalization (Val)?

Thanks, James

 
Reply With Quote
 
 
 
 
Zone
Guest
Posts: n/a
 
      15th Dec 2006
Tom, that is absolutely amazing. The Val keyword appeared to continue
operating properly, even while miscapitalized, as you no doubt know.
Very strange. Your breadth of knowledge is awesome. Thank you. James
Tom Ogilvy wrote:
> Try this:
>
> create a variable with the capitalization you want.
> Then delete it.
>
>
> Dim Val
>
>
> then delete it. Now
>
>
> r = Val("123abc")
>
>
> will be capitalized how you expect.
>
>
> When you create a variable (or property, in your case) that is a keyword,
> VBA remembers the capitalization even after you delete the
> variable/property. This just tricks into doing it right.
>
> (adaptation of advice previously posted in the newsgroup).
>
> --
> Regards,
> Tom Ogilvy
>
>
>
>
> "Zone" wrote:
>
> > I stupidly dimmed keyword Val as a variant in a userform, type variant,
> > like this:
> >
> > Dim HAL, VAL
> >
> > Now, in every module that Val appears, it as appears as VAL. Yikes! I
> > found the Dim statement as changed it to
> >
> > Dim HAL, VVAL
> >
> > but all the Val statements in other modules still show as VAL.
> > Obviously, VAL was not dimmed as public, so I don't know why this is
> > happening! How do I get the VAL in the other modules to return to
> > their normal capitalization (Val)?
> >
> > Thanks, James
> >
> >


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nothing Keyword Destories Objects rather than just resetting the variable to an empty variable Ronald R. Dodge, Jr. Microsoft Excel Programming 22 15th Dec 2008 09:19 PM
How to get what a variable is dimmed as? How to get what an object isdeclared as? If variable or object is Nothing? recurr Microsoft VB .NET 4 10th Dec 2007 04:12 PM
How do I remove lines of data above a keyword and below a keyword in a text file Quentin Microsoft VB .NET 1 25th Apr 2007 04:15 PM
Define Keyword as Variable =?Utf-8?B?VWxyaWNoMTk0Nw==?= Microsoft Access VBA Modules 1 9th Jul 2006 06:46 AM
My frontpage shared borders is dimmed, server command is dimmed to =?Utf-8?B?Y2Vh?= Microsoft Frontpage 3 9th Nov 2004 11:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:11 PM.