Solved top & Wrap formatting stop working

November 5, 2012 at 11:57:48
Specs: Windows XP
I formatt a whole worksheet to align "top" and "wrap text". It works for a while, then I go in to enter data and have to re-format. The "wrap text" box is always still checked but in light grey rather than the black it turns to when I re-format. The "top" designation is just missing.

See More: top & Wrap formatting stop working

Report •

✔ Best Answer
November 12, 2012 at 17:25:21
You enabled macros and it still says macros may not be enabled?

That doesn't make sense and there's not much I can suggest from this far away.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.



#1
November 5, 2012 at 16:13:33
Are you inserting rows or columns into this sheet?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
November 6, 2012 at 05:34:48
Yes, but it happens between those additions or deletions the same way. In other words, it is not just after I have done a deletion that the formatting goes away.

Report •

#3
November 6, 2012 at 07:57:34
I am unable to duplicate your problem, so the best I can offer is this...

Assign this code to a button in your Quick Access bar and run it whenever the problem occurs. It will simply set those 2 format options for the entire sheet.

Sub SetWrapTop()
    With Cells
        .VerticalAlignment = xlTop
        .WrapText = True
    End With
End Sub

You could also limit the code to just a Selection of cells.


Sub SetWrapTop()
    With Selection
        .VerticalAlignment = xlTop
        .WrapText = True
    End With
End Sub

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions

#4
November 6, 2012 at 08:26:15
You are over my skill set. I figured out how to add the autoformat icon to the quick access bar but that didn't seem to be the way to ad a "code". If this is really complex, I'm just going to keep re-formatting each time. I appreciate your help.

Report •

#5
November 6, 2012 at 08:53:25
Asssuming you only want this code in the workbook you are dealing with, follow these steps:

Note: this is the first time I've writen these up, so let me know if it doesn't work.

In the worksheet...

1 - Click Developer to show the Developer ribbon
2 - Click Visual Basic
3 - In the VBA editor that opened, Click Insert...Module
4 - Paste the code into the pane that opened
5 - Click the Red X to close the VBA editor

Back in your worksheet...

6 - Click the Down arrow on the Quick Access toolbar and choose More Commands
7 - Click the down arrow next to Popular Commands and choose Macros
8 - Highlight the name of the macro and click Add
9 - If you want a different Icon, click the modify button and choose an Icon that makes sense to you
10 - Click OK
11 - Save the file as a .xlsm macro enable file so the macro will be available each time.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#6
November 6, 2012 at 11:43:00
I think I followed the directions and it all looked ok but when I click on the Macro icon it gives me a message that says the Macro may not be enabled for the workbook or all macros may be disabled. I clicked on Macros and messed around some but nothing I did made it work. You are dealing with a novice here.

Report •

#7
November 6, 2012 at 13:02:04
I can tell you how to enable macros, but it should be an educated choice.

Click the Help icon (the question mark) and then enter/paste this into the search bar:

change macro security

The first link should explain your choices and the impacts of each.

Personally, I use the "Enable all macros (not recommended, potentially dangerous code can run)" setting as do most users who are comfortable with computers and understand the risks of using that setting. While Mother MS may want you to play it safe, as long as you don't go around opening files or running code from people you don't trust - in other words, use common sense - that setting should be fine.

For example, any file I download gets run through a virus checker. Any code I find on the web doesn't get run if I don't understand what it is going to do.

The choice is yours.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#8
November 12, 2012 at 13:33:07
I did "enable Macros" before it was pointed out that it is a self educating choice, and it still doesn't work. No doubt I am missing something but when everything I know about excel is stuff I have figured out I often don't understand even a simple instruction because it uses terms I don't know. Could take a class...I'll put that on my list for things to do when I'm not busy.

Report •

#9
November 12, 2012 at 17:25:21
✔ Best Answer
You enabled macros and it still says macros may not be enabled?

That doesn't make sense and there's not much I can suggest from this far away.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Ask Question