I am experiencing a really tricky problem and I am hoping I can explain it in a way that makes sense. First a little background. I am creating a workbook that is going to be shared with many different people so I have some very specific formatting settings that I am trying to apply to the workbook so that all the users can only view a specified area in each of the spreadsheets of the workbook. I currently have the spreadsheet view set to page layout view because I want both a header and a footer to identify each page and also it is the cleanest view for what is being displayed in the spreadsheets. I use the following code to set the viewing parameters of each worksheet when activated:
This code is in every worksheet and specifically set to the worksheet based on the number of columns/rows that are filled and that I want the users to be able to view in each spreadsheet. The purpose of the code is to set the zoom to a level that fits the width of a single page in page layout view to the width of the window and also restrict the scroll area to the width and height of a single page to prevent the users from moving around in any of the worksheets outside of the area that they need to fill out in each spreadsheet. The problem is this: for some reason every different machine I open this workbook on displays the workbook differently. Sometimes rows/columns are displaced to second pages vertically/horizontally and the zoom isn't set to a value that achieves the "one page to the width of the window" setting that I am looking for. On my computer it looks perfect. I am not sure if this is a solveable problem with code (or any other method of formatting) or if it is unavoidable. If any further clarification is needed please let me know. Thanks in advance for any insight or solutions.![]()
Private Sub Worksheet_Activate() Me.ScrollArea = "A1:B43" ActiveWindow.Zoom = 141 End Sub
Bookmarks