Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As to why it's there twice, imagine you have a segment of code that
you're editing in a separate window prior to pasting it into the main module. You started in the main module but decided to separate it out so as not to confuse what's where. The first portion of this code segment contains the following assignment: foobar = 1234 You paste that into your separate window, finish your editing, and paste it back to your main module. However, the code you highlight to replace excludes the original foobar=1234. Therefore you get it twice. This happens pretty often for people copying code from newsgroups, with things such as Option statements. On Dec 18, 11:47 am, wrote: On Dec 18, 12:13 am, carlo wrote: if the Variable is declared inside the sub the scope should be inside it as well. I don't know if you can get access to that variable, but i'd say 99% no. Right. Immediately after posting my "fishing" speculation, I realized that the only instances (that I know of) where a procedure has access to variables declared in the caller are languages where procedures can be defined within in the scope of other procedures (e.g. Algol-W). Oh well, I just trying to give the programmer the benefit of the doubt, stretching to find some meaning for the code. I'm sure now that there is none. Another thing what makes me think it is dummycode is the name of the variable "foobar" Sorry, the choice of the name was mine, just for posting purposes. It bears no relationship to the real name. I had already searched the Object Browser to no avail. Thanks again. I think your comments have put the final nail in the coffin. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
COUNTIF oddity | Excel Worksheet Functions | |||
An oddity if not a bug | Excel Worksheet Functions | |||
Oddity with HSI | Excel Programming | |||
Chart oddity | Charts and Charting in Excel | |||
Another Excel oddity | Excel Discussion (Misc queries) |