+ Reply to Thread
Results 1 to 6 of 6

Word wrap shortcut

  1. #1
    Registered User
    Join Date
    03-27-2008
    Posts
    3

    Word wrap shortcut

    Hi All,

    I often use Excell to create lists and schedules etc and regularly need to word wrap cells. I do this using the using the format-cells-alignment menu route, which is a bit long-winded. Is it possible for users to create a button on the menu to do this?
    I know I can use the keyboard shortcuts too, but it would be much more convenient if I could do this at one hit.... or click.

    Any help much appreciated.

    Ian.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    You can create a macro and then use the Toolbars customize to attach it to your toolbar.

    ChemistB

  3. #3
    Registered User
    Join Date
    03-28-2008
    Posts
    1

    Wink Creating a custom button to wordwrap in Excel

    Adding a Custom Button to Apply Word Wrap to Selected Cells in Excel 2003

    1. Click the ‘Toolbar Options’ button on the right-hand end of the Formatting toolbar.
    2. Select ‘Add or Remove Buttons’, ‘Customize...’.
    3. In the dialogue box which opens, Click on the ‘Commands’ tab.
    4. Select ‘Macros’ in the left-hand scroll box.
    5. Click on the ‘Custom Button’ entry in the right-hand box and drag it onto the Formatting toolbar.
    6. With the dialogue box still open, right-click the icon you have just placed on the toolbar. In the resulting menu, you will see a ‘Name’ entry, followed by ‘&Custom Button’.
    7. Select the words ‘Custom Button’ and type ‘Word Wrap’ to replace them.
    8. Move down the menu and select the ‘Text Only (Always)’ entry. The new button on the toolbar will now have this name. Close the Customize dialogue box.
    You have created the new button, but there is no action behind it. For the button to work you need to record and add a macro to it. This is much easier than you may think. Just follow the rest of these instructions and you will have your functioning button in no time.
    9. Select cell A1 and click on the new ‘Word Wrap’ button on the Formatting toolbar. The ‘Assign Macro’ dialogue box will open.
    10. Type “wordwrap” (no spaces) into the ‘Macro Name’ field and click the ‘Record’ button.
    11. Click the ‘Okay’ button in the ‘Record Macro’ dialogue box. The box will close and a small toolbar will appear. Ignore the toolbar for now, you will use it later. You will now go through the actions that need to be recorded to turn on wordwrap in a cell.
    12. Select ‘Cells’ from the ‘Format’ menu and then click on the ‘Alignment’ tab.
    13. Turn on wordwrap by clicking the relevant check box and then click the ‘Okay’ button. The dialogue box closes and all necessary actions have been recorded.
    14. Click the ‘Stop Recording’ button on the small toolbar I told you to ignore in step 11. The toolbar disappears and the recorded actions are assigned to the new button. All that is left to do is test it.

    Note. This technique can be used to add other custom buttons and speed up your day-to-day work in Excel.

    Hope this helps Ian? Let me know if you have any problems.

    tcclimber

  4. #4
    Registered User
    Join Date
    03-27-2008
    Posts
    3
    Many thanks TC, but I still have a problem;

    I followed your instructions and was able to create the button,
    I tried it in the workbook several times immediately after I'd created it and it worked well. Unfortunately when I closed Excel and re-opened the button was still there but had stopped working, instead I had 'Book1.xls could not be found' error message appear on screen.

    I repeated the process, creating a second new button on the toolbar with the same function and this had exactly the same result. Am I doing something wrong?


    Ian.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    You created the macro within the original workbook (Book1) and therefore the button cannot access it.

    When you go to create a macro, do you have the option of putting it in "Personal Macro Workbook"? If so, that's where you need to move that macro (or just re-record it with that option chosen rather than the default "This workbook"). If you want to move it, let us know and I'll give you directions on how to move that macro.

    ChemistB

  6. #6
    Registered User
    Join Date
    03-27-2008
    Posts
    3

    Many thanks.

    Many thanks guys,

    This is now working and gives me exactly what I need, I'm now going to use my newly-gained macro skills to create some other shortcuts to make my life easier.

    Aren't forums brilliant!?!

    Ian.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1