Consulting

Results 1 to 2 of 2

Thread: export styles

  1. #1
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location

    export styles

    hello
    is it possible through vba to export styles from one workbook to another?
    i mean beside merge the workbooks.
    thanks
    moshe

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    I found the following, or is this what you're trying to avoid?

    From http://office.microsoft.com/en-gb/as...101991033.aspx

    Merging styles from other workbooks

    When you create a new style, you can use it only in the workbook where you create it ? the new style is saved in the current workbook and won't appear in other workbooks. (This way, you won't mix up styles for your stock portfolio with those for your college expense budget.) However, you can copy or merge styles from other workbooks into the current workbook.



    Merging is a powerful tool, but you should use it with some caution. If the workbook into which you merge styles has matching style names, the new styles can override those existing styles and be applied throughout your workbook. Merge styles from other Excel workbooks


    1. Open the source workbook (the workbook you want to copy styles from) and the destination workbook (the workbook you want to copy the styles to).
    2. Activate the destination workbook
    3. On the Format menu, click Style.
    4. Click Merge.
    5. In the Merge Styles from box, select the name of the workbook you want to copy styles from (the source workbook), and then click OK.
    Excel copies all the styles from the source workbook to the destination workbook. If the source workbook contains formatting styles that have the same names as styles in the destination workbook, a warning message will appear asking whether you want to merge the styles with matching names anyway. If you click Yes, the styles will be merged, and the source styles will be applied throughout the workbook.

    Note The Undo command cannot reverse the effects of the merge. Be sure you want to copy over all the styles from the source workbook to the destination workbook. You may also want to delete any unwanted styles before you start the merge.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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