leopardhawk
Well-known Member
- Joined
- May 31, 2007
- Messages
- 611
- Office Version
- 2016
- Platform
- Windows
Hello forum friends, this is my second attempt to solve this, the last one ended badly. By badly, I mean with me just a confused simpleton. I'm thinking that what I am trying to do can't be all that difficult but I can't get it to work. Could really use some help here.
I have a workbook with 12 worksheets, all of them are of varying widths as far as the number and size of the columns. My goal is to have the workbook open on anyone's computer and 'fill the screen' horizontally, all the columns with data from left to right, no white space, especially to the right side. I don't care about the vertical aspect because the users can easily scroll up and down. I just don't want them to have to scroll left or right. I found this little piece of code but when I email the workbook to a different computer, the columns with data are all 'selected' but there are still five empty columns to the right.
Also, I have 12 worksheets that are using anywhere from 5 to 20 columns so I'm not sure how to incorporate that fact into the code either. I was just trying to get it to work with this one worksheet to start. Any help is much appreciated. Thanks!
I have a workbook with 12 worksheets, all of them are of varying widths as far as the number and size of the columns. My goal is to have the workbook open on anyone's computer and 'fill the screen' horizontally, all the columns with data from left to right, no white space, especially to the right side. I don't care about the vertical aspect because the users can easily scroll up and down. I just don't want them to have to scroll left or right. I found this little piece of code but when I email the workbook to a different computer, the columns with data are all 'selected' but there are still five empty columns to the right.
Code:
Private Sub Workbook_Open()
With Sheets("Sheet18")
Columns("A:L").Select
ActiveWindow.Zoom = True
Range("A1").Select
End With
End Sub