Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Why does this simple thing not work?
Hi,
This is a very simple thing, so i tought, but it just keeps giving an error. Private Sub CommandButton1_Click() 'BUTTON SAVE ActiveSheet.Range("M5").Copy Worksheets("Historiek").Select Range("D3").Paste End Sub Can anyone tell me why or what it is i'm doing wrong? Regards, Peter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Why does this simple thing not work?
Peter,
Additional information could help to answer your question... What version of Excel are you using? What is the error number and text? On what code line does the error occur? Is the Command button on a Worksheet, Chart or a UserForm? Making a swag, try setting the "Take Focus on Click" property of the command button to False. Jim Cone San Francisco, USA "Peter" wrote in message Hi, This is a very simple thing, so i tought, but it just keeps giving an error. Private Sub CommandButton1_Click() 'BUTTON SAVE ActiveSheet.Range("M5").Copy Worksheets("Historiek").Select Range("D3").Paste End Sub Can anyone tell me why or what it is i'm doing wrong? Regards, Peter |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Why does this simple thing not work?
"Peter" wrote in message
... Hi, This is a very simple thing, so i tought, but it just keeps giving an error. Private Sub CommandButton1_Click() 'BUTTON SAVE ActiveSheet.Range("M5").Copy Worksheets("Historiek").Select Range("D3").Paste End Sub Can anyone tell me why or what it is i'm doing wrong? Regards, Peter Activate auto-record a macro to see the correct sintax: Range("M5").Select Selection.Copy Sheets("Historiek").Select Range("D3").Select ActiveSheet.Paste |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Why does this simple thing not work?
Thx for all your help guys, everything works now.
You're great ;-) Greets, Peter "john" schreef in bericht ... On Thu, 22 Sep 2005 14:57:32 GMT, "Peter" wrote: Hi, This is a very simple thing, so i tought, but it just keeps giving an error. Private Sub CommandButton1_Click() 'BUTTON SAVE ActiveSheet.Range("M5").Copy Worksheets("Historiek").Select Range("D3").Paste End Sub Can anyone tell me why or what it is i'm doing wrong? Regards, Peter change Range("D3").Paste to Range("D3").select activesheet.Paste Or, just do this Range("M5").Copy Sheets("Historiek").Range("D3") and it'll paste it to D3 on Historiek john |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
So simple, but I can't get it to work | Excel Discussion (Misc queries) | |||
simple deletion won't work for me | Excel Discussion (Misc queries) | |||
Simple but I can't get it to work? PLEASE help!! | Excel Discussion (Misc queries) | |||
Simple Thing | Excel Programming | |||
Why this simple macro doesn't work? | Excel Programming |