SOLVED

Question about typing in the Visual Basic Editor Immediate Window

%3CLINGO-SUB%20id%3D%22lingo-sub-1769613%22%20slang%3D%22en-US%22%3EQuestion%20about%20typing%20in%20the%20Visual%20Basic%20Editor%20Immediate%20Window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1769613%22%20slang%3D%22en-US%22%3E%3CP%3EMy%20application%20contains%20many%20Debug.Print%20statements.%26nbsp%3B%20These%20leave%20the%20cursor%20in%20the%20immediate%20window%20positioned%20at%20the%20end%20of%20the%20line.%26nbsp%3B%20If%20I%20wish%20to%20type%20into%20the%20immediate%20window%20(e.g.%2C%20evaluate%20an%20expression)%2C%20I%20need%20to%20hit%20return%20to%20get%20a%20new%20line%20before%20I%20can%20type.%26nbsp%3B%20But%20hitting%20reutrn%20gives%20a%20%22Compile%20Error%3A%20Expected%3A%20end%20of%20statement%22%20and%20I%20have%20to%20dismiss%20the%20error%20before%20I%20can%20type.%26nbsp%3B%20I%20know%20I%20can%20avoid%20this%20by%20putting%20a%20new%20line%20%2F%20carriage%20feed%20at%20the%20end%20of%20each%20Debug.Print%20string.%26nbsp%3B%20Is%20there%20an%20easier%20way%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1769613%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1769681%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20about%20typing%20in%20the%20Visual%20Basic%20Editor%20Immediate%20Window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1769681%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F382386%22%20target%3D%22_blank%22%3E%40perkin_warbeck%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPress%20the%20Down%20Arrow%20key%20instead%20of%20Enter.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1769751%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20about%20typing%20in%20the%20Visual%20Basic%20Editor%20Immediate%20Window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1769751%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%26nbsp%3BThanks!%26nbsp%3B%20You%20are%20the%20best.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

My application contains many Debug.Print statements.  These leave the cursor in the immediate window positioned at the end of the line.  If I wish to type into the immediate window (e.g., evaluate an expression), I need to hit return to get a new line before I can type.  But hitting reutrn gives a "Compile Error: Expected: end of statement" and I have to dismiss the error before I can type.  I know I can avoid this by putting a new line / carriage feed at the end of each Debug.Print string.  Is there an easier way?

2 Replies
Highlighted
Best Response confirmed by perkin_warbeck (Occasional Contributor)
Solution

@perkin_warbeck 

Press the Down Arrow key instead of Enter.

Highlighted