Solved

VBA Editor greyed out

Posted on 2014-07-25
5
148 Views
Last Modified: 2014-07-28
Hi,

Im trying to line up indentations in my modules, when i highlight the code and attempt to edit using Format>Horizontal Spacing, the option to do so is greyed out

I have attached a screenshot

I have stepped in and out of the code but the problem still remain, has anyone a solution?

Thanks
0
Comment
Question by:Seamus2626
5 Comments
 
LVL 13

Accepted Solution

by:
duncanb7 earned 100 total points
ID: 40219547
where screenshot ?

Duncan
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 100 total points
ID: 40219561
I believe the Format menu is only for use with Drawn objects such as buttons on User Forms.

Thanks
Rob H
0
 
LVL 31

Assisted Solution

by:Helen_Feddema
Helen_Feddema earned 100 total points
ID: 40219597
There is no Format menu in the VB window (if we are talking about Access here).  The indentation is determined by the setting in the Options dialog, opened from the Tools menu in the VB window:
VB Options dialogIt is the same in the Excel VB window.
If your code has irregular indentations, you have to fix them manually.  The setting in the Options dialog only applies to future indents.
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 100 total points
ID: 40219613
If all you're trying to do is indent, you might try Smart Indenter:

http://www.oaltd.co.uk/Indenter/Default.htm

It's free, and I've used it in every version of Access from 2003 - 2013.

If you need more power, you might consider FMS CodeTools:

http://www.fmsinc.com/MicrosoftAccess/VBACodingTools.html

Total Visual Code Tools is very powerful, with tons of features. I use it every day in my Access work and would be very hard pressed to work in Access VBA without it.
0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 100 total points
ID: 40219621
you can use the "Indent" and "Outdent" from the Edit menu
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

828 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