Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 27th, 2005, 09:00 AM
Registered User
 
Join Date: Nov 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default vba code

what is the vba code for using "shift+left arrow" simultaneously twice

 
Old November 28th, 2005, 05:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 173
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Code:
' Turn of error handling as there's a chance that we will try to
' select a cell off the left of the sheet
On Error Resume Next

' Increase the selection by one column left, twice
Range(Selection.Cells(1, 1).Offset(0, -1), Selection).Select
Range(Selection.Cells(1, 1).Offset(0, -1), Selection).Select

' Switch on normal error handling again
On Error GoTo 0





Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Code D0MiN0 Access VBA 2 March 31st, 2008 03:55 AM
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
vba code need in.ssuresh Excel VBA 2 November 29th, 2005 08:40 PM
Help with VBA Code KevinN Excel VBA 1 April 22nd, 2005 06:50 AM
VBA code desprate Access VBA 7 April 12th, 2005 08:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.