On the same computer, after using VBA, the scale of the generated template is smaller. How can I adjust it to match the scale of the original template?

Y 0 Reputation points
2024-08-13T02:20:23.1466667+00:00

I used a VBA script to copy data from Excel A into the template of Excel B. The VBA script is designed to copy Excel B, save it as a new file called Excel C, and populate it with data from Excel A, creating multiple sheet templates stored in Excel C. However, on the same computer, the scale of Excel C (which has become smaller) is different from that of Excel A. Why is this happening, and how can I make the scale match the original template after using VBA script?

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,631 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,887 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,896 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,715 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 54,316 Reputation points
    2024-08-13T02:42:38.8966667+00:00

    Please clarify what you mean by "scale". The size of the spreadsheet? The zoom factor in the view? The data within it? Please be very specific about what you expected and what you're seeing.

    Please also, if possible, share the script you're using (if you believe it is the cause) and some repro steps. Finally please provide the version of Excel you're using.


  2. John Korchok 5,326 Reputation points
    2024-08-13T15:55:30.2366667+00:00

    You can set the scaling with:

    ActiveSheet.PageSetup.Zoom = 68
    
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.