Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
help w/ generic copy & paste/paste special routine | Excel Programming | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
I cannot paste from one workbook to another. Copy works, paste do. | Excel Discussion (Misc queries) | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming |