View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
stainless stainless is offline
external usenet poster
 
Posts: 18
Default Paste failing after cut

Actually, I have thought of a simpler way but still need help.

In this worksheet, I know that the populated colun is column "P" (the
letter of this column is held in a string variable called
gPictColumn).

If I was to leave the original code the same and use this variable in
the selection statement below, how would I code it?

Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select


I know I have to change the final statement to select up to that
column but I really have not got my head around how the
Selection.End(xlToRight) works, so do not know how to replace with the
gPictColumn reference. Note that if I need to change the "P" to a
column number, I already have a function called
ConvertColumnLetterToNumber( to do that.