Help with Cut copy and paste...........
for starters your :
Call CutCopyPaste1
On Error Resume Next
You need to specify what you want to occur.
EG.
sub copy_Paste()
if range("A1") <"" then
call cutpaste 1
else
....
end sub
"Mr.G" wrote in message
...
Hi I have written this up. Now I want the cutcopypaste macro's to carry on
if
the first sheet is full it must move on to number 2 and if 2 is move to
3..........
When a sheet is filled up it gives a error that it cant move the colums
without
losing data.
How do I say that in here?
Private Sub CommandButton1_Click()
Unload FrmInsert
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Call CutCopyPaste1
On Error Resume Next
Call CutCopyPaste2
On Error Resume Next
Call CutCopyPaste3
On Error Resume Next
Call CutCopyPaste4
Sheets("Proj").Select
FrmThank.Show
ActiveWorkbook.Save
End Sub
All that happens now is it cut's and paste in all four sheets
similtaniosly(sp)
Any suggestions?
Here is sample of macro CutCopyPaste1.The other is exactly the same exept
it
pastes in the next sheet.
Sub CutCopyPaste1()
Application.ScreenUpdating = False
ActiveCell.Columns("A:E").EntireColumn.Select
Selection.Copy
Sheets("Sheet1").Select
ActiveCell.Columns("A:A").EntireColumn.Select
Selection.Insert Shift:=xlToRight
Columns("A:E").EntireColumn.Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.ColumnWidth = 1
Application.ScreenUpdating = True
End With
End Sub
Please Help.
|