ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Embarassingly simple question regarding VB Editor (https://www.excelbanter.com/excel-programming/387498-embarassingly-simple-question-regarding-vbulletin-editor.html)

[email protected]

Embarassingly simple question regarding VB Editor
 
Dear all,
excuse me for using space for this simple question -- but I have not
found a resolution in the documentation.

When writing Excel macros in the VB Editor, it almost immediately
immediately fills in blanks, but does not move the cursor
correspondingly -- which is very irritating since this suddenly leaves
me continuing my code in the middle of the line. I have to press
[(line) END] button after every VBE space completion (i e very often),
to continue writing the line in my code.

E g, when writing the following line of code
r(1,2)=-log(p(2))/dt
I get to
r(1,2)=-log(p(2))
when the automatic space completion fills in
r(1, 2) = -Log(p(2#))
*but* leaving the cursor at "#" (# just indicates the cursor
position), so if I do not discover the automatic change and do not
press [END] before continuing with "/dt" I end up with
r(1, 2) = -Log(p(2/dt))
which is clearly not the same thing.

I have switched off 'Auto Syntax Check' but it does not seem to cover
this situation. Any clues on how to e g have the code checking invoked
only when I press return?

Thanks,
Carl


Jim Jackson

Embarassingly simple question regarding VB Editor
 
When the autofill occurs, press "Tab" and the cursor will go to the end of
the autofill.
--
Best wishes,

Jim


" wrote:

Dear all,
excuse me for using space for this simple question -- but I have not
found a resolution in the documentation.

When writing Excel macros in the VB Editor, it almost immediately
immediately fills in blanks, but does not move the cursor
correspondingly -- which is very irritating since this suddenly leaves
me continuing my code in the middle of the line. I have to press
[(line) END] button after every VBE space completion (i e very often),
to continue writing the line in my code.

E g, when writing the following line of code
r(1,2)=-log(p(2))/dt
I get to
r(1,2)=-log(p(2))
when the automatic space completion fills in
r(1, 2) = -Log(p(2#))
*but* leaving the cursor at "#" (# just indicates the cursor
position), so if I do not discover the automatic change and do not
press [END] before continuing with "/dt" I end up with
r(1, 2) = -Log(p(2/dt))
which is clearly not the same thing.

I have switched off 'Auto Syntax Check' but it does not seem to cover
this situation. Any clues on how to e g have the code checking invoked
only when I press return?

Thanks,
Carl



[email protected]

Embarassingly simple question regarding VB Editor
 
Thanks for your reply Jim,
but I can have cases where pressing tab once still leaves me inside
the expression instead of the end of the line. For example
r=log(p(i))/dt
is changed into
r = Log(p(i#)) ' # still cursor sign
and tabbing once gives
r = Log(p(i)#).
However, tabbing once more gives
r = Log(p(i) #)
which is then after some seconds changed into the desired
r = Log (p(i))#
suitable for continued code on that line.

Is there a way to turn off this immediate space completion, or at
least have it done when I press Return? It almost seems like a bug to
leave the cursor in the middle of the line, messing up continued
coding. I hope I do not have to start writing code using Notepad...

Thanks for any help.
Regards,
-- Carl

On 16 Apr, 18:22, Jim Jackson
wrote:
When the autofill occurs, press "Tab" and the cursor will go to the end of
the autofill.
--
Best wishes,

Jim



" wrote:
Dear all,
excuse me for using space for this simple question -- but I have not
found a resolution in the documentation.


When writing Excel macros in the VB Editor, it almost immediately
immediately fills in blanks, but does not move the cursor
correspondingly -- which is very irritating since this suddenly leaves
me continuing my code in the middle of the line. I have to press
[(line) END] button after every VBE space completion (i e very often),
to continue writing the line in my code.


E g, when writing the following line of code
r(1,2)=-log(p(2))/dt
I get to
r(1,2)=-log(p(2))
when the automatic space completion fills in
r(1, 2) = -Log(p(2#))
*but* leaving the cursor at "#" (# just indicates the cursor
position), so if I do not discover the automatic change and do not
press [END] before continuing with "/dt" I end up with
r(1, 2) = -Log(p(2/dt))
which is clearly not the same thing.


I have switched off 'Auto Syntax Check' but it does not seem to cover
this situation. Any clues on how to e g have the code checking invoked
only when I press return?


Thanks,
Carl- Dölj citerad text -


- Visa citerad text -





All times are GMT +1. The time now is 11:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com