Questions tagged [vbe]

Visual Basic Editor is the built in IDE for writing VBA. It is hosted by various MS Office programs. Use this tag for general questions about the IDE or the Microsoft VBA Extensibility Library (VBIDE) which allows automation of the Visual Basic for Applications Editor.

Visual Basic Editor is the built in IDE for writing VBA. It is hosted by various MS Office programs. Use this tag for general questions about the IDE or the Microsoft VBA Extensibility Library (VBIDE) which allows automation of the Visual Basic for Applications Editor.

VBE has three key elements: Code window (on the right); Projects window (top left), and Properties window (bottom left). Example for Excel:

VBE example

Others may be added, for example for Watches.

217 questions
2
votes
1 answer

How to programmatically force a break in the VBE Editor

I am writing a c# application that opens a number of PI ProcessBook display files. PI Processbook is a program that has embedded Visual Basic for Applications support, including a VBE environment. The problem that I have is that a number of the…
ainwood
  • 992
  • 7
  • 17
2
votes
3 answers

Excel VBE inconsistent exports

I am exporting .bas files from an .xls file as outlined here: Exporting A VBComponent Code Module To A Text File to check them in into an SVN repo. I am encountering the following issue which causes a change in casing of variable names in the files…
Henrik K
  • 1,051
  • 1
  • 15
  • 34
1
vote
0 answers

I cannot enable macro in my Excel, there is always a pop-up of Microsoft Visual Basic for Applications that says 'missing end bracket'

I found this problem when I want to open an Excel document sent by my co-worker, the file has a macro in it but I can't find a way to enable it. When I click to enable macros this always happens and after one attempt of enabling macro, now everytime…
Devis
  • 11
  • 1
1
vote
0 answers

Graphics output from Arduino to a PCI SVGA video card

I am working on a retro computer project that needs somewhat high resolution video output (at least 800x600 16 bit color). All retro computers (by this I mean anything before 80286) I am aware of use much lower resolutions and color modes, so…
Stan K
  • 11
  • 2
1
vote
0 answers

VBA Editor: Letter capitalization vs scope of variables

I realized that VBA Editor (Excel 2019 VBE) change case of variables when you have different variables (different scope) but same name with different case. For example, we have the code below, which have 3 "variables" Var1, Var2 and Var3, and it…
sergio trajano
  • 189
  • 1
  • 1
  • 14
1
vote
1 answer

How to stop Visual Basic editor from automatically opening after macro runs?

I have working code where the only issue is that it opens the Visual Basic editor while it's running, closes it, then reopens it when it's finished. I believe this is because I am creating workbooks, importing a module, and adding a sheet event to…
Deinceps
  • 21
  • 4
1
vote
1 answer

How can I change the fontsize in excel365 vba Project Window?

I know how to change the EDITOR code window font but cannot find a way to change the font in the other windows. I don't want to change the screen resolution as I usually have other apps open as well. I am quite happy to edit the registry if only I…
1
vote
1 answer

How to set the VB Editor default directory?

How does one set the default directory for the VBA Editor? This ought to be obvious in any application, not to mention an obligatory feature, but I can't figure it out. Having to navigate up and over my directory structure from an irrelevant…
ebsf
  • 121
  • 6
1
vote
1 answer

VBA editor opens when I select a file in Windows Explorer

I've written code to change the contents of a cell in multiple protected workbooks looking up the value to be inserted from a table in my worksheet. The issue I have is that when I select a file in the \Files\ folder, it opens up the VBA editor…
Matt Drake
  • 144
  • 8
1
vote
0 answers

How can I Write Own Video Driver for My OS?

While I am writing my own OS, this question comes to my mind! Is it Possible to write own video drivers like VGA, VESA ( In BIOS ) and GOP, UGA ( In UEFI ) ,if yes then how?
Vapour Dev
  • 90
  • 8
1
vote
1 answer

Counting Type Variables in Excel vba, possible?

Currently im working with excel vba. I'm asking myself if there is a possibility to count the variables declared in a user defined Type as shown below. Public Type NameOfType a as string b as string End Type Here the result would be 2. Thank…
McFly
  • 13
  • 3
1
vote
1 answer

How can one disable autoformatting in Excel's VBA editor?

The single most annoying feature in Excel's built-in VBA editor is—in my opinion—the aggressive autoformatting of the code, which insists on rewriting what I have typed as soon as the cursor leaves the line. It is particularly distressing that the…
Anton Shepelev
  • 922
  • 9
  • 19
1
vote
1 answer

Multiple empty Excel VBA projects

Excel generates multiple empty projects (cannot be expanded with "+") as soon as I open the VBA editor. Every time I close/reopen the editor, new projects add to the pile. How do I counter this? This is a RDS (Windows server 2016 Datacenter), using…
renaud E
  • 43
  • 6
1
vote
1 answer

Running C# Code through Macro in MS Project

I have some C# code which formats a MS Project file. This code works absolutely fine. Problem: Now, I want to run the same C# code through a macro script. Question: How can I execute the C# code through my MS Project macro. So, whenever the user…
reggie
  • 13,313
  • 13
  • 41
  • 57
1
vote
1 answer

How to set the cursor currently after deleting a line of the active CodePane in an ms-access VBE-Add-in?

I wrote a C# Add-in for the VBA-Editor of ms-access. See: How to write a Add-in for the development enviroment: "Microsoft Visual Basic for Applications" My add-in searches for code, marks it and - after a second click - deletes it. The active…
Gener4tor
  • 414
  • 3
  • 12
  • 40