+ Reply to Thread
Results 1 to 5 of 5

Gridlines and zoom in newly created workbook with VBA

  1. #1
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Gridlines and zoom in newly created workbook with VBA

    Hi,

    I have the following piece of code that will select some of my worksheets from a template and copy/paste them in a new worksheet and rename it as well. The code works just fine, without any issues. But due to the nature of my reports I need to set the gridlines = true and zoom = 70% in the newly created file. I tried adding some pieces of code into it but without results. I am hoping that anyone may have an idea on how to do it. The zoom is not so important, but I really need the gridlines to be set to true.

    Thank you.

    Please Login or Register  to view this content.
    Click the * to say thanks.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Gridlines and zoom in newly created workbook with VBA

    Hi there,

    See if the highlighted addition to your code will do what you need:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Gridlines and zoom in newly created workbook with VBA

    Hi Greg, thank you for your solution. So easy and so elegant. Brilliant!

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Gridlines and zoom in newly created workbook with VBA

    Hi again,

    Many thanks for your very prompt feedback and also for the Reputation increase - much appreciated

    You're welcome - I'm glad I was able to help.

    Best regards,

    Greg M

  5. #5
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Gridlines and zoom in newly created workbook with VBA

    Sorry to bother you Greg, but I hope that you may point me out in the right direction. If I have 3 graphs in one of the tabs copied how can I copy them into the new file as well? it seems that my current code doesn't copy them

    EDIT: Added one piece of code after grouping the charts and fixed my problem
    Please Login or Register  to view this content.
    Last edited by PaulM100; 07-17-2019 at 11:38 AM.

+ 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. [SOLVED] Run macro from newly created workbook
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-15-2018, 08:54 AM
  2. bringing 2 sheets (at the end of workbook) to the Same newly created workbook
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-16-2015, 07:10 AM
  3. [SOLVED] Email newly created line in excel workbook
    By klospros in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 11-21-2014, 11:48 AM
  4. use existing creation date of workbook with newly created .saveas workbook
    By dwr0211 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-04-2011, 12:42 PM
  5. Using a macro to add code to a newly created workbook.
    By Alagard in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-16-2010, 06:08 PM
  6. Open newly created macro from new workbook
    By stubarso in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-06-2010, 02:30 PM
  7. Saving Workbook in newly created directory
    By sgreni in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-19-2009, 11:42 AM

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