Window too narrow - allows only one character per line - excel

I have a weird problem in Excel's Visual Basic Editor: it shows me a very thin textfield with only one character per line and no way to alter the dimensions.
Has anybody experienced a similar problem or is there a way to open macros in a text editor as a workaround?
System: Mac OS 10.11.1, Office 2016 v15.13.1, already tried reinstall.

According to this link by Visual Basic support in Office for Mac 2016 is almost non existent. So a workaround would be to install an earlier version for the use of macros.
Thanks to Meehow for pointing it out.

I experience the same issue.
You can copy all code, edit it in a text editor before pasting the content back into the VB Editor. It's ugly but it works.
Selecting all via Cmd+A works even if you can't visualise it.

Related

VBA editor in any Office 365 app not opening anymore

I am using VBA in most of my office 365 applications for many years now. Last week an error appeared that I can't fix anymore, without having to create a new profile in windows (according to Microsoft helpdesk). Besides that this is quiet a lot of work that I would like to avoid, if this is the only solution, I like to know what happened and why, to prevent future errors.
Problem: in any office 365 application, when opening the vba editor, in the taskbar, a window appears that I cannot open and that looks like a corrupted editor window. Hence I cannot edit my code anymore. The code is runnable though from the developers-macros-run-menu.
Cause: I ran a code from ms-word, that saves the pages from a merged document into separte files, .docx and .pdf. The code was running fine, but after a little editing started to quit before the last page was reached and after some time trying over, I couldn't open the editor anymore. I am not sure if this error is caused by the code, or something else.
Unfortunately I cannot display the code here, because I can't open it anymore.
I updated Office 365 to the last version, without any result.
Creating a new Windows-account solves the problem, but implies that I have to reinstall many apps and services.
Does anyone have had the same experience, what is the problem and/ or what can I do to restore this error other than the new-account solution?
The VBA Editor window moved off screen. This might have been caused by accidentally pressing WINDOWS KEY + SHIFT + ARROW (not likely), or by a problem in windows 10.
For a solution see https://superuser.com/q/53585
I'd the same problem.
That´s just a question of hidden windows. Just press shift and left click on top of the code window in the task bar. Then select maximze and your window will appear.
Hope it helps.
Joao

VBA EDITOR quits (terminates) Excel 2016 on mac

I am using MAC OS Mojave 10.14 and Excel version 16.19. I am trying to use the VBA editor to create macros. However, whenever I insert a userform and try to change its properties (such as color, font, etc.) or when I click on an object to complete the word by using list constants, Excel terminates itself and gives this error.
Is there any reason for (or a possible solution to) this problem?
The version you provided means you have Office 2019, not Office 2016.
The ability to insert and edit userforms is not yet supported. Microsoft accidentally turned this capability on for a few users, but the feature isn't even ready for testing, yet. It will come along pretty soon, though, as you can see that quite a bit of the interface is built.

How to paste text with syntax highlighting from the IDE (in format HTML) under Linux in MS Office format?

Good afternoon. It so happened that for several years I have kept notes on programming in large Excel files with through the table of contents. All code is illuminated to every part of the code you can instantly get there thanks to hyperlinks within the document. Everything was fine until after I moved to Ubuntu by working necessity. In linux there are several options - Libre Office, Open Office and work with MS Office under Wine.
While none of these options could not solve the underlying problem.
When you copy data from the IDE PhpStorm captured lighting, it is very important to quickly understand code. So - when you insert data in Libre Office everything is inserted into a single cell and read a large piece of code more than one screen becomes impossible. Either one line - but without syntax highlighting.
Today I installed Wine, PlayOnLinux, MS Office 2010, everything seems nice and cool - but when copying data from the clipboard into the linux Vine insertion error occurs. The data can only be inserted in the format of a naked text without highlighting.
If anyone knows how to solve my problem - I shall be grateful for your help.
Maybe there are some other alternatives Excel to store large, complex synopses?
As far as I recall Libreoffice will read the excel file without changing anything, just tell libreoffice to open the excel file.
If libreoffice doesn't recognise the xls suffix, use "open with".
You can always tell libreoffice to save the xls file as a libreoffice spreadsheet later, as I imagine that Phpstorm simply uses the same method to decide what to use to open a file as everything else.
If some reason you are still having trouble, investigate unoconv which is available in the repositories.

VBA editor auto-deletes spaces at the ends of lines

Is there a way to convince the VBA editor in Excel to stop auto-formatting lines to remove the space at the end when I pause in my typing for a quarter second?
I had this exact problem and the following worked for me.
Click the Microsoft Office Button, and then click Excel Options
Click the Add-Ins category
In the Manage box, click COM Add-ins, and then click Go.
Look for an add in called 'Load Test Report AddIn' then uncheck it
restart excel
This addin is installed with VS2010 Beta2
In Excel 2010, toggling Design Mode button on the Developer Ribbon Tab solves the problem for me.
I've definitely had that issue before, where the vba editor would format as I was typing (not just when I went to another line). For me, it seemed to be related to a Microsoft Web Browser control that I had in an open workbook. When I took out the web browser, the VBA editor started acting normally again. I have no idea why that worked, but it did. Now I avoid using that control in my workbooks.
Something is causing your spreadsheet to recalculate while you are in the VBA Editor and this 'compiles' your code and thus strips the spaces. You need to stop the cells recalculating while you are editing. Turning the calculation to manual in the spreadsheet.
Tools > Options > Calculation should do the trick.
I noticed this when I had cells recalculating thanks to a DDE connection.
There is sort of a way to turn off the auto-"correction" in the VBA Editor.
Tools Menu -> Options -> Editor Tab -> Clear the Auto Syntax Check box
Sadly, this won't solve all your problems, as the VBA Editor tends to have a mind of its own, for better or worse.
Taking it out of design mode fixes it every-time on vba2003 - its was driving me crazy at first ... i did notice it might have something to do with the web control but when i take it out of design mode it works fine ... just toggle that to get it to behave :)
I have had this same problem several times recently, and has driven me crazy.
After reading this post all the different fix-ups mentioned (none worked for me), I recalled I have been playing lately with Internet Explorer Control, opening Internet Explorer from VBA.
This is mentioned in some of the answers in this post.
This got me in the right path and, in order to fix it, I had to first delete all iexplore.exe instances (alt+control+delete), closed Excel and open excel again.
(iexplore.exe had been opened invisible from the VBA code, and I didn't know they were running)
That fixed the bug.
I have been programming quite heavily with VBA for over 4 years, and never had this problem.
Just a couple of weeks ago I started using IE control, and I started getting this problem...so in my case I can only assume the bug is directly related to the IE control.
I am running both excel 2003 and 2007 in same PC at the same time, and the problem only happens with excel 2007.
None of the above for me.
I had a Application.OnTime timer that fired every second and this triggered a recalculation of something: commenting it made my day.
This has started happening to me recently after adding a Timer event to an Access 2007 form. The VB editor "finalizes" the current line (as if you had moved the cursor off of the statement; I have auto syntax checking off) each time the event fires (initially I had it set to 1 second, now it is set to 5 seconds, and the behavior scales accordingly). In order for the event code to execute, the application has to ensure that it has been compiled. Presumably, the editor needs to be in a "sane" state to do this, as it probably has to check for code dependencies among modules. Note that the behavior occurs regardless of whether any dependent code is actually loaded into the editor at the time. Note also that resetting the execution state doesn't affect the timer event firing. As a practical matter, one could close the triggering form, switch it to design view, set a breakpoint in the triggered code, or increase the timer interval while working with the editor.
In contrast to abhishek's comment, changing the settings of Tools/Options.../General/Compile On Demand and/or Background Compile did not affect the issue.
If it helps, none of the previous answers solved mine. Only solution appeared to be to close the xls file and reopen it. Frustrating to have to do every 30 mins but at least it works. Would love to know why it's recompiling and cleaning the text... should really be an option to disable the text cleanup but couldn't find it.
Turn off Tools > Options > General > Background Compile. This solved it for me.
This is a long standing problem that could have various causes. I had this same issue occur in the Access VBE (so naturally the Excel answers weren't relevant). After a LOT of digging I finally got it fixed with the solution below. First a recap though:
If you are here because of this issue in Excel, try the solutions above first. To summarize:
The most common issue in Excel is that the Design button is toggled. Toggle that and see if the behavior changes as submitted by Dmitry Frenkel above
If that doesn't work, check for the "Load Test Report" AddIn as mentioned by Ade.
Those are really the two main causes in Excel, but if neither of those solutions work, then scroll through the rest of the solutions here. All are valid possibilities for the cause. In Access the cause is pretty straight forward. It's a timer issue on a form somewhere. I found this solution from here by User Kevin K. Sullivan.
Copy the following line of code onto the clipboard. (You might need to
paste it into a text editor first and coerce it onto one line, depending on
your newsreader. It must be one line.)
For i = 0 to Forms.Count -1: Debug.Print Forms(i).Name, Forms(i).TimerInterval: Next i
Switch to Access.
Press Ctrl-G to go to the Immediate Window.
Press Ctrl-V to paste in the code.
Press enter to to run the code. All open forms will be listed. Any non-zero timer intervals are your culprits. Simply close that form (It may be invisibly open from another process than the one you thought you were dealing with).
I think the solution for Access here is what the user Dom was trying to say above. I guess the down votes were because it wasn't explained very well and/or because he was speaking of Access when the OG issue was in Excel. Regardless, he is likely on point if you are here because of the VBE in Access.
I hope this helps people. I know I kept finding this page when researching this issue, so that's why I thought I'd update this solution here.
I hit this problem today on a fresh install of Excel 2010 Beta 2. None of the above made any difference, but going into the trust center and disabling all application add-ins fixed the problem for me.
I have Office 2010 Pro and I had the same issue. As I type the space between each word was being deleted. After trying each of the options turning them on and off the only way I found working was to disable the Winzip Courie(excel) add-in. This is done thru the Options dialog box Add-Ins section.
In office 365 I had the same issue - what worked for me is I saved the file with a different name and when I re-opened the new file the problem went away.
I found this issue pops up when I had AutoSave on. Turning that off let me code without it compiling every second.
I don't think I've ever seen the VBE remove a space when I've stopped typing. It will remove trailling spaces from lines if you move to another line, but that's something different and not behaviour that I think can be altered.
The removal of spaces in the VBA editor for Access occurs when a form is open in Form("Execute") mode. This is probably due to background executions based on "On Timer" methods. Close the form in Access solves the problem in VBA.

Problem with toolbar in Excel 2003

I have a very simple Excel Addin build it in Visual Studio 2008 for Excel 2003, which creates a toolbar with some buttons.
When I debug it, with System Format set to "English (United States)" it works great, without problems.
However, this addin is going to be used with System Format set to "French (France)" too, and when I try to debug my addin under this configuration, the toolbar (which is created by the addin) is not being shown.
While I'm debugging I can see that the methods that create the toolbar are executed and the code returns fine, yet I can't see anything in Excel, and if I switch back the format to English it works again.
Does anyone know which could be the reason?
I had a similar problem with an add-in that I built for Excel 2000. Although the tool bar would show, nothing was on the toolbar. I was able to correct the issue by downloading the
office multilanguage pack 2003.
Here is a link to it, assuming you do not already have this installed it may be worth a shot.
http://office.microsoft.com/en-us/ork2003/HA011402201033.aspx
In the end, there was a problem related with the decimal separator, which changes for French language, and a validation that I was doing in my code, I missed that part when debugging, thanks for the answers anyway.

Resources