+ Reply to Thread
Results 1 to 7 of 7

Excel Macro Causing the Formatting to change to Default

  1. #1
    Registered User
    Join Date
    09-29-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    27

    Excel Macro Causing the Formatting to change to Default

    Hi All,

    I have an excel macro that is causing to typed content to change to default, so for example if I have entered something in italics, it would change it to normal once I press enter.

    Can someone please let me know how I can change this macro to avoid this.


    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Excel Macro Causing the Formatting to change to Default

    You've got two:
    Please Login or Register  to view this content.
    in your last line of code - perhaps that is causing your problem?
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    09-29-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Excel Macro Causing the Formatting to change to Default

    Actually it is Autofit function that is causing this. What can I add in the autofit function below to stop defaulting to default font settings.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-29-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Excel Macro Causing the Formatting to change to Default

    Sorry tested again. Its not in AutofitRows(). Moreover, I have seen there are no two instances of Allowformattingcells in the last row. Any suggestions please.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Excel Macro Causing the Formatting to change to Default

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  6. #6
    Registered User
    Join Date
    09-29-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Excel Macro Causing the Formatting to change to Default

    Actually its application.enable events thats causing it. I have tested it thoroughly. Any idea how to overcome it without removing the use of Application.enableevents.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Excel Macro Causing the Formatting to change to Default

    Is there code in any of the sheet modules or the ThisWorkbook module??

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Change default setting for Conditional Formatting
    By BoardGuy in forum Excel General
    Replies: 2
    Last Post: 03-23-2023, 08:14 AM
  2. excel macro to automatically change default printer
    By James Bromley in forum Excel General
    Replies: 1
    Last Post: 01-15-2006, 07:45 AM
  3. Is it possible the change the default chart formatting.
    By Kingston999 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-06-2006, 10:25 PM
  4. [SOLVED] how to change the default formatting of comments in excel?
    By Zach in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-19-2005, 07:05 AM
  5. Replies: 2
    Last Post: 08-18-2005, 01:05 PM

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