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?

Microsoft 365 and Office Development Other
Microsoft 365 and Office Install, redeem, activate For business Windows
Microsoft 365 and Office Excel For business Windows
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 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 6,126 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.