Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Dimmed Keyword as Variable

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Dimmed Keyword as Variable

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
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
most of menus are dimmed and the worksheet is invisible OfficeUser Excel Discussion (Misc queries) 1 September 30th 09 02:27 PM
What makes the data tab in Excel to be dimmed? csabbar Excel Discussion (Misc queries) 0 September 17th 08 02:04 AM
Toolbox is dimmed Naum Charts and Charting in Excel 1 November 16th 07 09:04 AM
Protect menu options dimmed Deborah[_2_] Excel Discussion (Misc queries) 1 August 1st 07 07:51 PM
excell 2002 dimmed command button Excel Discussion (Misc queries) 1 February 12th 05 11:19 PM


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

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

About Us

"It's about Microsoft Excel"