View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
saziz[_50_] saziz[_50_] is offline
external usenet poster
 
Posts: 1
Default Select empty column & paste - Help please


Hi All,
Here is my problem:

I am copying a range (say A1:C150 ) then I am activating another
workbook and
selecting a sheet (sheet1) and find first empty column and paste.

Can someone please help.

Here is my code:

Sub test3()
Dim lastcolumn As Range
Range("A1:E150").Select
Application.CutCopyMode = False
Selection.Copy
Windows("DataAll.xls").Activate
ActiveWindow.WindowState = xlNormal
Sheets("Sheet2").Select
ActiveSheet.lastcolumn = Cells(1, Column.count).End(xlLeft).Column
Cells(lastcolumn + 1, 1).PasteSpecial Paste:=xlValues _
, Operation:=xlNone, SkipBlanks:=False, Transpose:=False

End Sub

the above code doesn't work

thanks
Syed


--
saziz
------------------------------------------------------------------------
saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350
View this thread: http://www.excelforum.com/showthread...hreadid=494770