stramvaier
07-29-2011, 03:10 AM
my problem is as follows:
i have a commandbutton in my sheet.
i want it to allways copy the info in cell A1 to next sheet, but also let the user select select a row in my sheet that is going to be copied also. that row can vary between 50 different rows, but just one each time the button is pressed.
here is what i tried so far,but i cant seem to get it to work:eek:
i think what i struggle with is to declare the correct memory and the correct notation that tells what it is.
Sub CommandButton1_click()
Dim minne1 As String
minne1 = Rows.userdefined.Select
Sheets("Kjøling").Select
Range("minne1").Select
Selection.Copy
Sheets("Sammenligning").Select
Range("A4").Select
ActiveSheet.Paste
Sheets("Kjøling").Select
Range("A1").Select
Selection.Copy
Sheets("Sammenligning").Select
Range("A3").Select
ActiveSheet.Paste
Sheets("Kjøling").Select
End Sub
Any help is greatly appreciated.im new to this and learning everyday so pleace dont kill me for beeing stupid:help
i have a commandbutton in my sheet.
i want it to allways copy the info in cell A1 to next sheet, but also let the user select select a row in my sheet that is going to be copied also. that row can vary between 50 different rows, but just one each time the button is pressed.
here is what i tried so far,but i cant seem to get it to work:eek:
i think what i struggle with is to declare the correct memory and the correct notation that tells what it is.
Sub CommandButton1_click()
Dim minne1 As String
minne1 = Rows.userdefined.Select
Sheets("Kjøling").Select
Range("minne1").Select
Selection.Copy
Sheets("Sammenligning").Select
Range("A4").Select
ActiveSheet.Paste
Sheets("Kjøling").Select
Range("A1").Select
Selection.Copy
Sheets("Sammenligning").Select
Range("A3").Select
ActiveSheet.Paste
Sheets("Kjøling").Select
End Sub
Any help is greatly appreciated.im new to this and learning everyday so pleace dont kill me for beeing stupid:help