+ Reply to Thread
Results 1 to 4 of 4

Vba code - to ignore conditional formatting

  1. #1
    Registered User
    Join Date
    03-01-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    49

    Cool Vba code - to ignore conditional formatting

    Good Day,

    I have a workbook that copies all relevant data from 12 sheets to 1 main sheet.

    This data is used purely for reference.

    The Code is as follow:

    Please Login or Register  to view this content.
    It is shared by 13 different people on a Macro enabled sheet just incase you are wondering.

    The problem I am having, is that it copies and applies the conditional formating rules of each sheet to the main sheet. This drastically increases my workbook size every time someone opens the main sheet. In 2 days of activity the size of the excel workbook has increased from 2.8mb to a whopping 97 mb. I have tested the sheet for ghosting, and applied formatting to used cells only in the multiple sheets. The problem is truly the conditional formatting to the main sheet.

    Is it possible to remove the ability to copy the conditional formatting. Thus removing the problem I am having?

    Can my code be adjusted to do this?

    Thanking you in advance.

    JEDEMEYER1

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Vba code - to ignore conditional formatting

    Add this after any pasting

    if whole main sheet
    Please Login or Register  to view this content.
    Partial
    Please Login or Register  to view this content.
    Last edited by humdingaling; 04-23-2013 at 01:51 AM. Reason: added partial

  3. #3
    Registered User
    Join Date
    03-01-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Vba code - to ignore conditional formatting

    Thanks Humdingaling,

    I added it to the source code, it now looks like this:

    Please Login or Register  to view this content.
    Works great, until I activate sharing, it then gives me the following error as soon as you view the main sheet: Run-time error '1004': Application-defined or object-defined error.

    Did I paste it in the wrong area? Please could you check the code to see.

    Thanks again

    JEDEMEYER

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Vba code - to ignore conditional formatting

    not having used shared workbooks in past previously
    i found as soon as i turned on shared....conditional format was greyed out completely
    Did some research on internet and found two MS links explaining limitations of shared workbooks
    http://support.microsoft.com/kb/130560
    http://office.microsoft.com/en-us/ex...005201080.aspx

    This behavior occurs because when you share a workbook file, you cannot use some of the Microsoft Excel features that you normally use. This behavior is by design of Microsoft Excel because of the way that a shared file is saved. For example, you cannot change cell formatting in a shared workbook.

    sorry dead end

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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