Screen Size

J

jambun

Is there a way of having the cells you want to see (Width) fit
whatever screen it is connected to?
ie: I have a spreadsheet which has many columns but I only want x
number showing. If I change the screen size I dont want to resize the
column widths to suit the new screen. Is there any code that will do
this?
Thanks in advance
EPJ
 
D

Dave

Hi,
Here is some code I use to ensure that at least Columns up to and including
Column P are always visible. It works by using the VisibleRange thingy to
manipulate the zoom %.
Change the two Columns.Count refs to suit your page.
Put this code into an event macro for the sheet you want it to work on.


ActiveWindow.Zoom = 100
A = 100
If Windows(1).VisibleRange.Columns.Count < 17 Then
Do Until Windows(1).VisibleRange.Columns.Count > 16
ActiveWindow.Zoom = A
A = A - 1
Loop
End If

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top