Gustav Brock
asked on
Read the "Options, Tab Width" setting of the the VBE Options from VBA?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
/gustav
Good observations Gustav....i found it by searching through ProcMon
here is a link for setting it using visual studio -- called tab size
https://msdn.microsoft.com/en-us/library/awdwz11a.aspx
https://msdn.microsoft.com/en-us/library/awdwz11a.aspx
Set Visual Basic Environment Options
https://msdn.microsoft.com/en-us/library/office/gg264737.aspx