PDA

View Full Version : Solved: Problem in append data to next column



tlchan
08-22-2008, 05:26 PM
Hi there,
I have 3 worksheet and I wanted to transfer my current data in sheet("Cards") column D Add to column E of the same sheet and at the same time append to next column A in sheet ("FY0809").

The button in sheet("reportdate") will run the macro for above task. However the data only appended in column B of sheet ("FY0809") instead of next column on every button pressed.

The macro works in VBE under run but failed in button click command. Anybody can assist me ?

Attach the sample workbook

mdmackillop
08-22-2008, 05:49 PM
The relevant part only

Sub AddtoCul()
Dim NextCol As Range
Set NextCol = Worksheets("FY0809").Cells(1, 256).End(xlToLeft).Offset(, 1)
Worksheets("cards").Range("D5:D59").Copy
NextCol.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False '
End Sub

tlchan
08-23-2008, 02:20 AM
It works perfectly. Thanks Md for your quick solution.:hi: