VBIDE stands for Visual Basic Integrated Development Environment. VBIDE used as IDE for Visual Basic Language and Development.
Questions tagged [vbide]
25 questions
8
votes
1 answer
How do I know that `ThisWorkbook` is a `Workbook`?
I'm working with the VBIDE API, and can't assume that the host application is Excel, or any Office app either.
So all I know is that I'm looking at a VBComponent, and that its Type is vbext_ct_document.
In the VBE's immediate pane I can get this…

Mathieu Guindon
- 69,817
- 8
- 107
- 235
7
votes
1 answer
What's the difference between CommandBarEvents.Click and CommandBarButton.Click in VBE?
The VBA and VB6 Add-In Object Models (VBIDE) expose a CommandBarEvents object that have a Click event, and the event signature is:
Dim WithEvents CmdBarEvents As CommandBarEvents
Private Sub CmdBarEvents_Click(ByVal CommandBarControl As Object,…

ThunderFrame
- 9,352
- 2
- 29
- 60
7
votes
1 answer
Cleaning up CommandBar buttons
I have an issue with my COM add-in that has been dragging for months, and I can't figure out why.
The IDTExtensibility2 implementation has been peer reviewed by Carlos Quintero (the guy behind MZ-Tools) already, and deemed correct.
Per his…

Mathieu Guindon
- 69,817
- 8
- 107
- 235
7
votes
2 answers
Excel VBA store functions or subroutines in an array
In C/C++, when I have a bunch of functions (pointers), I can store them in an array or a vector and call some of them together in a certain order. Can something similar be done in VBA?
Thanks!

user2961927
- 1,290
- 1
- 14
- 22
5
votes
1 answer
How do I use VBIDE in a VB6 Addin to programmatically print source code..?
How do I programmatically print source code in a VB6 Addin..? There are no print or preview methods that I can find for VBIDE in the Object Browser.
I've searched high & low on Google, and there's a strange lack of information on VBIDE code module…

spinjector
- 3,121
- 3
- 26
- 56
5
votes
4 answers
How can I catalog, index, and/or print VB6 source code, with each sub/function on a page..?
How can I catalog, index, and/or print VB6 source code with each sub or function on its own page..? I would like to do so with free or included Visual Studio Add-Ins if possible, but I'm not adverse to writing something myself. I'm familiar with…

spinjector
- 3,121
- 3
- 26
- 56
5
votes
1 answer
Will renaming Visio's `ThisDocument` module cause any problems?
The default Viso document has a CodeName of ThisDocument and unlike other Office documents, the ThisDocument component's CodeName appears to be Read Only.
If I have trusted access to the VBE, then I can rename the component, with a line like…

ThunderFrame
- 9,352
- 2
- 29
- 60
4
votes
2 answers
Method 'VBE' of object '_Application' failed
One of my clients has issue running the Excel VBA code below. He gets the following error Method 'VBE' of object '_Application' failed, but only once, after he opens the VBE, it starts to work. Also, it was working for him until yesterday.
He is…

Jevgenius
- 41
- 1
- 2
4
votes
2 answers
Trust access to the VBA project object model greyed out
I'm on MS office 2013. I need to uncheck the "Trust access to the VBA project object model" check box for some testing purpose. But I'm unable to do so, as it is greyed out (and it is checked).
What might be the reason. How can I enable the check…

Brahmaprasad R
- 131
- 2
- 9
3
votes
1 answer
VBA - Auto check/uncheck microsoft script run time
I had the following function that auto add Microsoft Script Runtime Reference to the Reference list. However, if the user already had included Microsoft script runtime, it will show error Name conflicts with existing module,project, object library. …

Max
- 429
- 1
- 8
- 25
3
votes
1 answer
How can I load a VBA library reference and use it in the same procedure?
I have a VBA script for Excel that adds a small procedure in the active workbook. The final version will add a procedure that auto-saves backup copies of the workbook.
The code requires the Microsoft Visual Basic for Applications Extensibility 5.3…

ChrisB
- 3,024
- 5
- 35
- 61
3
votes
1 answer
OLE Automation and interacting with another VBE / VBA IDE
I am familiar with OLE Automation and controlling other applications from a given VBA IDE / VBE (particularly Excel's VBE). While I know it's possible to use the SendKeys method as a way to essentially accomplish what I am trying to do, I feel it…

Singularity20XX
- 321
- 5
- 20
3
votes
1 answer
Iterate over Methods defined in a Module
I have recently found out about VBIDE library, but I don't quite grap all of it's capabilities yet. I want to make a method that will instantiate correct Class based on classes found in my Project. Classes that fit as candidates to be instantiated…

sgp667
- 1,797
- 2
- 20
- 38
3
votes
1 answer
Import lines of code
Can we read scripts or lines of code to a module in vba? Like we have the include function in php.
For example:
We store this in Excel somewhere and call the range as xyz
line 1 of code
line 2 of code
line 3 of code
Then while running a macro we…

dsauce
- 592
- 2
- 14
- 36
2
votes
1 answer
Creating macros within VBA editor
I know how to create functions within a VBA project to create new code/modules/forms using the VBIDE library, but is it possible to tie these functions to a button in the VBA editor, so that I may insert code snippets say at the cursor position?

Joe
- 92
- 4