Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy, paste to another sheet
Hi,
I would like to copy, paste data from one sheet to another sheet. I have made command button with this code, and it doesn't work. If someone can help? Range("A4:C4").Select Selection.Copy Sheets("Data").Select Range("A2").Select ' code stops on this sentence (even if I put range A2:C2) Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy, paste to another sheet
Sheets("Data").Range("A2:C2").Value = Sheets("Sheet1").Range("A4:C4").Value
Adjust sheet names to match yours. -- Regards, Tom Ogilvy "HrvojeZagi" wrote in message ... Hi, I would like to copy, paste data from one sheet to another sheet. I have made command button with this code, and it doesn't work. If someone can help? Range("A4:C4").Select Selection.Copy Sheets("Data").Select Range("A2").Select ' code stops on this sentence (even if I put range A2:C2) Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Thanks in advance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy, paste to another sheet
If you prefer to go with your current code
Private Sub CommandButton1_Click() Range("A4:C4").Select Selection.Copy Sheets("Data").Select ActiveSheet.Range("A2").Select Selection.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, SkipBlanks:=False, _ Transpose:=False End Sub -- Regards, Tom Ogilvy "HrvojeZagi" wrote in message ... Hi, I would like to copy, paste data from one sheet to another sheet. I have made command button with this code, and it doesn't work. If someone can help? Range("A4:C4").Select Selection.Copy Sheets("Data").Select Range("A2").Select ' code stops on this sentence (even if I put range A2:C2) Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Thanks in advance |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy, paste to another sheet
use this method if you want formats and values:
Range("A4:C4").Copy With Sheets("Data").Range("A2") .PasteSpecial xlPasteAll .Value = .Value ' omit to keep formulae End With Use Tom's method to copy just values... Sheets("Data").Range("A2:C4").Value = Range("A4:C4").Value "HrvojeZagi" wrote in message ... Hi, I would like to copy, paste data from one sheet to another sheet. I have made command button with this code, and it doesn't work. If someone can help? Range("A4:C4").Select Selection.Copy Sheets("Data").Select Range("A2").Select ' code stops on this sentence (even if I put range A2:C2) Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy from one Sheet and paste on another sheet based on condition | Excel Discussion (Misc queries) | |||
Active Cell Copy And Paste Sheet to Sheet | New Users to Excel | |||
Copy paste to another sheet | Excel Discussion (Misc queries) | |||
automatic copy and paste from sheet to sheet in a workbook | Excel Programming | |||
pls help!! copy -paste to another sheet. getting the sum | Excel Programming |