#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Best fit

hi guys,

I've got a little problem with code for auto fit (or any other ) t
screen size. What I intend to do is to make single worksheet focused o
specific range every time user activates the worksheet.
thx for help


tit

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Best fit

example applicable to say sheet3:

Off Sheet3 in VBE copy:

Private Sub Worksheet_Activate()
Application.Goto Range("g12"), True
End Sub

Will that do?


"skitek " wrote in message
...
hi guys,

I've got a little problem with code for auto fit (or any other ) to
screen size. What I intend to do is to make single worksheet focused on
specific range every time user activates the worksheet.
thx for help


tito


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Best fit

skitek wrote:
*hi guys,

I've got a little problem with code for auto fit (or any other ) t
screen size. What I intend to do is to make single worksheet focuse
on specific range every time user activates the worksheet.
thx for help


tito *


I guess not. I thought about creating selffocusing worksheet activat
function. Would you please give me a sample of code which would allo
me to make a printarea range fit to the screen so that only this are
would be visible and user wouls see only this part of worksheet

th

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Best fit

Private Sub Worksheet_Activate()
Dim rng As Range
Set rng = Selection
Range("A1:M20").Select
ActiveWindow.Zoom = True
If Union(ActiveWindow.VisibleRange, rng).Address = _
ActiveWindow.VisibleRange.Address Then
rng.Select
Else
Range("A1").Select
End If
End Sub


--
Regards,
Tom Ogilvy

"skitek " wrote in message
...
hi guys,

I've got a little problem with code for auto fit (or any other ) to
screen size. What I intend to do is to make single worksheet focused on
specific range every time user activates the worksheet.
thx for help


tito


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"