LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Selection.Delete Shift:=xlToLeft (what's the meaning of this?)

Hello,

Could someone explain to me what is the meaning of the VBA expression:
Selection.Delete Shift:=xlToLeft

Intuitively, I would suppose that it should delete the selection, but why
there is this "Shift" part coming after?

The whole part of the code I try to analyze goes like this (and it looks
like a big garbage for me):

(...)
Range("A3").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Confirmations").Select
Range("BA22").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Columns("BA:BD").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Columns("BC:BD").Select
Selection.Delete Shift:=xlToLeft
Columns("BD:BF").Select
Selection.Delete Shift:=xlToLeft
Columns("BE:BZ").Select
Selection.Delete Shift:=xlToLeft
Range("BA22:BD55").Select
Selection.Copy
Range("A22").Select
ActiveSheet.Paste
(...)

In particular, I can't see what is the goal of selecting first BA:BD, then
BC:BD, then BD:BF and finally BE:BZ...
Is it me that don't understand something or the code should be written
differently? (hint: it's still functionning correctly and it is not deleting
the data pasted in BA22 (lines 4-8 of the code)).

Many thanks for any explanations!
Mark




 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selection By Shift & Arrow In VBA FARAZ QURESHI Excel Discussion (Misc queries) 3 May 9th 09 11:21 AM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Excel VBA Selection.Delete Shift:=xlToLeft [email protected] Excel Programming 1 February 14th 06 07:12 PM
Selection.End(xlToLeft).Select Norbert Jaeger Excel Programming 1 August 12th 05 02:35 PM
Shift+Arrow does not expand selection No_RZN Excel Discussion (Misc queries) 2 May 25th 05 07:49 AM


All times are GMT +1. The time now is 06:12 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"