vba courses london - select cell change
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft VBA Training and help » vba courses london - Select cell - change view

vba courses london - Select cell - change view

The UK's most regular instructor-led training courses.
Training information: vba courses london · Excel london

resolvedResolved · Low Priority · Version Standard

Select cell - change view

Mandy has attended:
Access Intermediate course
Access Advanced course

by - delegate Mandy [3 posts] (2007 Mar 14 Wed, 14:07) replyReply

Hi when I write the following small piece of VBA:

Sub Thresholds()

' Take the user to the Threshold update area

Range("O25").Select
End Sub

I want the cell selected (O25) to be in the TOP LEFT of the screen (it currently is in the middle so I can see Columns L onwards and rows 1 downwards

I only want to be able to see columns O onwards and 25 and downwards

Regards
Mandy

RE: Select cell - change view

by - trainer Carlos gold contributer[394 posts] (2007 Mar 20 Tue, 11:05) Edited on 2007 Mar 20 Tue, 11:09 replyReply

Hi Mandy

To set your cell selection to the TOP LEFT you can do the following:

Always start on Range ("A1") for consistency. Then select select the target cell

Then use the SmallScroll method as seen below in the updated Thresholds Sub.

NB You scroll to the right one less number than the taget column and scroll down one less numberthan the target row.

Sub Thresholds()

' Take the user to the Threshold update area

Range("A1").Select 'Always start at "A1"
Range("O25").Select 'The target cell
ActiveWindow.SmallScroll ToRight:=14 'One lees than the number of Columns
ActiveWindow.SmallScroll Down:=24 'One less than the number of Rows

End Sub


Related articles

· Company Roles in Visual Basic Training
· What Is Microsoft Excel VBA and How Can It Help You Work Smarter?

Vba tip:

Stop Screen Flickering When Running Code

Running VBA code may cause the screen to flicker as the monitor is the slowest part of the program and cannot keep up with the very fast changes taking place.

To switch off the screen until the program is run enter the following code line:

Application.ScreenUpdating = False

The screen comes on automatically on completion of the program.

View all VBA hints and tips

Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz