+ Reply to Thread
Results 1 to 3 of 3

Create Table Style Macro Not Producing Expected Results

  1. #1
    Registered User
    Join Date
    08-16-2007
    Posts
    50

    Create Table Style Macro Not Producing Expected Results

    Hello All,
    I am trying to create a macro that will create a table style with a thin black line around the table and header cells, dashed grey lines separating cells in the body, and header text bold. I recorded a macro creating the table style format I want, then renamed the style I created and ran the recorded macro. The table style created by the recorded macro does not look the same as the style I created when recording it. The style produced by the recorded macro does not have any of the borders I created, but I can't tell why when I look at the code. An example spreadsheet with the table style I created and the one produced by the recorded macro is attached, and the recorded code is below. I would be greatly appreciated if someone would explain why the macro isn't producing what I expected and/or point me the right direction for how to get a macro to produce what I'm looking for.
    Thanks

    TableStyleExampleWorkbook.xlsm

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    06-12-2015
    Location
    WA
    MS-Off Ver
    10
    Posts
    33

    Re: Create Table Style Macro Not Producing Expected Results

    Add this into your macro.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-16-2007
    Posts
    50

    Re: Create Table Style Macro Not Producing Expected Results

    Thanks for your help. I believe the code gave changes the boarders of the range of the table, but I'm looking to create a table style that can be applied to any table. However, your code gave me a hint and I figured it out. I had to change the line style to .LineStyle = xlContinuous for outside boarders and .LineStyle = xlDash for inside boarders. Thanks again for your help!

+ 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. Expected table is not in the expected format - ADODB Connection to Read Only Excel file
    By Roshan10043 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-05-2018, 10:54 AM
  2. if statement not producing value expected
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-21-2015, 02:50 PM
  3. Replies: 2
    Last Post: 08-24-2014, 04:56 AM
  4. Macros: Data cleaning macros not producing expected outputes.
    By bertlogdi1 in forum Excel Programming / VBA / Macros
    Replies: 31
    Last Post: 06-17-2011, 06:52 AM
  5. Macro is not generating expected results.
    By Foxcan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2009, 04:16 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