Solved

VBA Editor greyed out

Posted on 2014-07-25
5
145 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
Comment Utility
where screenshot ?

Duncan
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 100 total points
Comment Utility
you can use the "Indent" and "Outdent" from the Edit menu
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now