PC Review


Reply
Thread Tools Rate Thread

Creating a common starting point

 
 
ordnance1
Guest
Posts: n/a
 
      18th May 2010
I run the code below to ensure that all worksheets are set to a 100% zoom and
that cell A3 is selected on all worksheets. Is ther also a way to ensure that
all worksheets are scrolled all of the way to the top?

Sheets(Array("January", "February", "March", "April", "May", "June", "July",
"August", _
"September", "October", "November", "December")).Select
Sheets("January").Activate
Range("A3").Select
ActiveWindow.Zoom = 100
Sheets("January").Select
 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      18th May 2010
Try this...

ActiveWindow.ScrollRow = 1

--
Rick (MVP - Excel)



"ordnance1" <(E-Mail Removed)> wrote in message
news:2B7C7C40-72CD-49DD-A0E1-(E-Mail Removed)...
> I run the code below to ensure that all worksheets are set to a 100% zoom
> and
> that cell A3 is selected on all worksheets. Is ther also a way to ensure
> that
> all worksheets are scrolled all of the way to the top?
>
> Sheets(Array("January", "February", "March", "April", "May", "June",
> "July",
> "August", _
> "September", "October", "November", "December")).Select
> Sheets("January").Activate
> Range("A3").Select
> ActiveWindow.Zoom = 100
> Sheets("January").Select


 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      18th May 2010
Sub scrollToTheTopOfSheet()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Select
ActiveWindow.ScrollRow = 1
Next
End Sub

"ordnance1" wrote:

> I run the code below to ensure that all worksheets are set to a 100% zoom and
> that cell A3 is selected on all worksheets. Is ther also a way to ensure that
> all worksheets are scrolled all of the way to the top?
>
> Sheets(Array("January", "February", "March", "April", "May", "June", "July",
> "August", _
> "September", "October", "November", "December")).Select
> Sheets("January").Activate
> Range("A3").Select
> ActiveWindow.Zoom = 100
> Sheets("January").Select

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      18th May 2010
Hi,

Shts =
"January,February,March,April,May,June,July,August,September,October,November,December"
v = Split(Shts, ",")
For x = 0 To UBound(v)
Sheets(v(x)).Select
Application.Goto Sheets(v(x)).Range("A3")
ActiveWindow.Zoom = 100
Next
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"ordnance1" wrote:

> I run the code below to ensure that all worksheets are set to a 100% zoom and
> that cell A3 is selected on all worksheets. Is ther also a way to ensure that
> all worksheets are scrolled all of the way to the top?
>
> Sheets(Array("January", "February", "March", "April", "May", "June", "July",
> "August", _
> "September", "October", "November", "December")).Select
> Sheets("January").Activate
> Range("A3").Select
> ActiveWindow.Zoom = 100
> Sheets("January").Select

 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      19th May 2010
this will also work for selecting range
Sub scrollToTheTopOfSheet()
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Worksheets
With ws
.Activate
.Range("A3").Activate
End With
With ActiveWindow
.View = xlNormalView
.ScrollRow = 1
.Zoom = 100
End With
Next
Application.ScreenUpdating = True
End Sub

"ordnance1" wrote:

> I run the code below to ensure that all worksheets are set to a 100% zoom and
> that cell A3 is selected on all worksheets. Is ther also a way to ensure that
> all worksheets are scrolled all of the way to the top?
>
> Sheets(Array("January", "February", "March", "April", "May", "June", "July",
> "August", _
> "September", "October", "November", "December")).Select
> Sheets("January").Activate
> Range("A3").Select
> ActiveWindow.Zoom = 100
> Sheets("January").Select

 
Reply With Quote
 
ordnance1
Guest
Posts: n/a
 
      19th May 2010
This is how I altered your code (it lives in my Auto_Open) but it does not
cycle through all the work sheets, but does work on the currently active
sheet.

Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ActiveWindow.ScrollRow = 1
Range("A3").Select
ActiveWindow.Zoom = 100
Next

"Mike" wrote:

> Sub scrollToTheTopOfSheet()
> Dim ws As Worksheet
> For Each ws In ThisWorkbook.Worksheets
> ws.Select
> ActiveWindow.ScrollRow = 1
> Next
> End Sub
>
> "ordnance1" wrote:
>
> > I run the code below to ensure that all worksheets are set to a 100% zoom and
> > that cell A3 is selected on all worksheets. Is ther also a way to ensure that
> > all worksheets are scrolled all of the way to the top?
> >
> > Sheets(Array("January", "February", "March", "April", "May", "June", "July",
> > "August", _
> > "September", "October", "November", "December")).Select
> > Sheets("January").Activate
> > Range("A3").Select
> > ActiveWindow.Zoom = 100
> > Sheets("January").Select

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      19th May 2010
Try

Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
Application.Goto ws.Range("A3"), True
ActiveWindow.ScrollRow = 1
ActiveWindow.Zoom = 100
Next


--
Jacob (MVP - Excel)


"ordnance1" wrote:

> This is how I altered your code (it lives in my Auto_Open) but it does not
> cycle through all the work sheets, but does work on the currently active
> sheet.
>
> Dim ws As Worksheet
> For Each ws In ThisWorkbook.Worksheets
> ActiveWindow.ScrollRow = 1
> Range("A3").Select
> ActiveWindow.Zoom = 100
> Next
>
> "Mike" wrote:
>
> > Sub scrollToTheTopOfSheet()
> > Dim ws As Worksheet
> > For Each ws In ThisWorkbook.Worksheets
> > ws.Select
> > ActiveWindow.ScrollRow = 1
> > Next
> > End Sub
> >
> > "ordnance1" wrote:
> >
> > > I run the code below to ensure that all worksheets are set to a 100% zoom and
> > > that cell A3 is selected on all worksheets. Is ther also a way to ensure that
> > > all worksheets are scrolled all of the way to the top?
> > >
> > > Sheets(Array("January", "February", "March", "April", "May", "June", "July",
> > > "August", _
> > > "September", "October", "November", "December")).Select
> > > Sheets("January").Activate
> > > Range("A3").Select
> > > ActiveWindow.Zoom = 100
> > > Sheets("January").Select

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem restarting/starting a Microsoft Common Console Service =?Utf-8?B?YnJ1bmV0dG8=?= Windows XP General 1 20th Jan 2006 02:26 PM
Common Code in Access - Excel - Power Point Programs CLarkou@gmail.com Microsoft Powerpoint 1 18th Nov 2005 01:09 PM
Common Code in Access - Excel - Power Point Programs CLarkou@gmail.com Microsoft Excel Discussion 1 18th Nov 2005 01:09 PM
how do i link several power point presentations to a common table. =?Utf-8?B?TWFubnk=?= Microsoft Powerpoint 2 17th Mar 2005 11:30 AM
Creating common Address Book w/out ES Curtis Vaughan Microsoft Outlook Discussion 2 21st Oct 2004 09:09 PM


Features
 

Advertising
 

Newsgroups
 


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