Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with worksheet_change script

On Jun 22, 3:09*pm, "Clif McIrvin" wrote:
"programmernovice" wrote in message

...
On Jun 22, 10:41 am, "Clif McIrvin" wrote:





"programmernovice" wrote in message


....
On Jun 21, 6:33 pm, "Clif McIrvin" wrote:


"GS" wrote in message


...


programmernovicelaid this down on his screen :
Let's say I type


sub
then I press the space bar
and then type search


I get subsearch, all letters in red. If I then insert the cursor
after "b" and press the space bar I get


sub search, now all letters black. Any idea what may be causing
this,
some setting in the VB Editor,perhaps? Thanks again.


This is the normal behavior for the VB Editor. It's a built-in
feature
to help guide you in writing code using proper syntax.


Well, yes ... and no. If you read the question again, OP pressed the
spacebar between sub and search but the space character didn't
register.


Sounds to me like a spacebar that only works part of the time.
(I have seen that from time to time over the years.)


--
Clif McIrvin


(clare reads his mail with moe, nomail feeds the bit bucket :-)-
Hide
quoted text -


- Show quoted text -


This is exactly what happens Clif. However, the spacebar always,
without fail, works everywhere else. Is simply does not register when
in the VB Editor. I guess I must have some bug in Excel.


-----


I cannot reproduce the behavior you describe ...


Reading back through the thread, it sounds as though you were typing
Garry's code (instead of doing a copy + paste).


Some questions:


You say that (for instance) you enter [ sub<spsearch ]
and you get
[ <redsubsearch</red ]


When I type it, *"sub" comes out red. *After <sp the whole thing
turns black. *So I end up with subsearch in black.



But, you can insert a space between the b and s.


Question: is that always the case? In other words,
doeseverythingyoutypelooklikethis and not like this?


that is always the case.



Can you copy / paste an example "in context" from your VBE window so
that we can see several lines above and below the line that is giving
you the syntax error (red) highlight?


subdifmin()

solveroksetcell:=Range("Collect.xlm!
absDif"),maxminval:=2,valueof:="0",bychange:=("col lect.xlm!
absdif").offset(0,-1)
solversolve (True)
solverfinish (True)

EndSub

All the above was typed in, with spacebar in the appropriate places
(e.g. between End & Sub). *Interestingly only the first 2 lines are in
red, the rest are black. *I could, if I wanted to, separate EndSub by
placing the cursor between d and S and hitting spacebar.



I don't know if it matters, but what version of VBA are you running?
(Help|About from the VBE window).


What version of Excel?


Excel is 2003 SP3

Microsoft VB is 6.5 version 1053.

This problem is more of a nuisance than anything else, I can always
fix it as described, but it would be nice not to have to.
Thanks for your kind help.

----------

I'd consider that much more than merely "a nuisance"! *I've never heard
of anything like what you just described ... the additional detail you
provided makes it much easier (for me, at least!) to realize what you
are seeing at your end.

If no-one else "bites" on this thread in the next day or so, I'd suggest
that you re-post this explanation under a subject line something like,
"<spacebar ignored by VBE" and see if you get a response from others.

Maybe try to "repair" your Office installation? (Others in this room
have much more experience than I.)

--
Clif McIrvin

OK Clif, many thanks for helping me out with this.
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
worksheet_Change Leslieac Excel Programming 2 February 22nd 06 07:31 PM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM
worksheet_change vs. calculate, and worksheet_change not running Tom Ogilvy Excel Programming 1 July 14th 03 02:51 AM
worksheet_change vs. calculate, and worksheet_change not running Ross[_5_] Excel Programming 0 July 13th 03 04:27 PM


All times are GMT +1. The time now is 10:26 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"