Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Read the "Options, Tab Width" setting of the the VBE Options from VBA?

Posted on 2016-09-18
5
Medium Priority
?
65 Views
Last Modified: 2016-09-19
How to read this, please?

It's at the menu: Tools, Options, Editor, Tab Width. This setting I wish to read. Default value is 4:
VBE
My guess was that it could be found somewhere under the VBE object, but that seems not to be the case.

/gustav
0
Comment
Question by:Gustav Brock
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 22
ID: 41804344
I like to change that one too, gustav ;) ~

Set Visual Basic Environment Options
https://msdn.microsoft.com/en-us/library/office/gg264737.aspx
0
 
LVL 18

Accepted Solution

by:
John Tsioumpris earned 2000 total points
ID: 41804373
I don't think you can access this setting under VBA.
There is a setting set in registry
[HKEY_CURRENT_USER\Software\Microsoft\VBA\6.0\Common]
You will see a TabWidth which you can modify
0
 
LVL 51

Author Closing Comment

by:Gustav Brock
ID: 41804399
Thanks John, that's it. (Crystal, that link is for the UI only).

Two things to add:

[list]This registry entry does not exist by default. It is created first time you change the setting.[/list]
[list]For Access 2016, the path is: ..\VBA\7.1\Common[/list]

However, and strangely, property [b]VBE.Version[/b] reports 7.01, not 7.1 so you have to find the path perhaps like this:

    VbeVersion = Replace(VBE.Version, "0", "")

or, though doubtful, in case of an upcoming version 10:

    VbeVersion = Split(VBE.Version, ".")(0) & "." & CStr(Val(Split(VBE.Version, ".")(1)))

/gustav
0
 
LVL 18

Expert Comment

by:John Tsioumpris
ID: 41804400
Good observations Gustav....i found it by searching through ProcMon
0
 
LVL 22
ID: 41804403
here is a link for setting it using visual studio -- called tab size
https://msdn.microsoft.com/en-us/library/awdwz11a.aspx
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question