Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Help with Cut copy and paste...........

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Help with Cut copy and paste...........

Ok so I need to say:
Call CutCopyPaste1 ' my macro
If workbook ColumIV = Full
Then
Call CutCopyPaste2
etc....
"Corey" wrote:

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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
help w/ generic copy & paste/paste special routine DavidH[_2_] Excel Programming 5 January 23rd 06 03:58 AM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
I cannot paste from one workbook to another. Copy works, paste do. JimmyMc Excel Discussion (Misc queries) 1 June 10th 05 03:54 PM
Copy and Paste macro needs to paste to a changing cell reference loulou Excel Programming 0 February 24th 05 10:29 AM


All times are GMT +1. The time now is 11:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"