VBE removes the last space?

Jaymond Flurrie

Well-known Member
Joined
Sep 22, 2008
Messages
921
Office Version
  1. 365
Platform
  1. Windows
I just noticed that VBE keeps removing the last space that I type. This naturally breaks the code pretty badly. It does it in real time which is even worse.

So when I try to type
Code:
Dim i as integer
the result is
Code:
Dimiasinteger
and it doesn't take a genius to understand that the later doesn't work. It fixes it to that last one so fast that I can't type the whole row before it breaks the code, so the only option I have right now is to actually write without spaces and then add spaces. You can imagine how much this slows me down.

Any idea what causes this and any idea how to fix it?


This has never happened to me before (I recently installed Visual Studio & VSTO, maybe it has something to do with this?)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
very weird that it happens while you type...

I know if you type
Dim[space]
then go to another line and go back, the space is gone, but as long as you stay on the same line, it should not be erasing them...

Sorry to say I have no idea what's causing it, but I feel for you, it must be driving you crazy :(
 
Upvote 0
very weird that it happens while you type...

I know if you type
Dim[space]
then go to another line and go back, the space is gone, but as long as you stay on the same line, it should not be erasing them...

Sorry to say I have no idea what's causing it, but I feel for you, it must be driving you crazy :(

Good point, I thought that does VBE do it so that it throws me out of the line after each character, but I think it finally wasn't about that either. I mean, I tried a comment line and the same thing happens there too - spaces are removed from the end.

The good thing here is that I can re-install Office if needed. Naturally I would prefer not to, but unless someone here comes up with some "uncheck that one from there" etc. option, that's the thing I have to try and I'd say it most likely solves it.
 
Upvote 0
I don't know why it's happening, but I do wonder whether it has anything to do with the references set in Tools > References. I have the following references set...

Visual Basic for Applications
Microsoft Excel 14.0 Object Library
OLE Automation
Microsoft Office 14.0 Object Library

Do you have at least these ones set?
 
Upvote 0
All I can think of right now is some sort of keyboard hook that eats your spaces... maybe a virus of some sort?

Do you have spacebar issues in other programs?
 
Upvote 0
I don't know why it's happening, but I do wonder whether it has anything to do with the references set in Tools > References. I have the following references set...

Visual Basic for Applications
Microsoft Excel 14.0 Object Library
OLE Automation
Microsoft Office 14.0 Object Library

Do you have at least these ones set?

Yeah, it seems also that it corrected itself. And no, I didn't have it on any other program.

If you run into this problem, restart Excel!
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top