Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear ALL
I have the following question: I placed the button on the excel sheet and assign a macro which cuts the cells' values from range b1:b4 and pastes them into range a10:d10 everything is ok and works perfectly, but how can I do so that when I press the button again the new values which i type in range b1:b4 placed in a11:d11 ? and so on, is it possible? Please help me with this Thank you in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Something like
iRow = Cells(Rows.Count, "A").End(xlUp).Row If iRow 10 Or Range("A10").Value < "" Then iRow = iRow + 1 Else iRow = 10 End If ' do your copy Range("A" & iRow).Resize(1, 4).Paste -- HTH Bob Phillips "Alex" wrote in message ... Dear ALL I have the following question: I placed the button on the excel sheet and assign a macro which cuts the cells' values from range b1:b4 and pastes them into range a10:d10 everything is ok and works perfectly, but how can I do so that when I press the button again the new values which i type in range b1:b4 placed in a11:d11 ? and so on, is it possible? Please help me with this Thank you in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Bob
thank you for your answer but here i have some questions. Where should i place this code? when i am placing it as a button code i have the error message "Object doesn't support this property or method " could you explain me with step by step? Thank you "Bob Phillips" wrote: Something like iRow = Cells(Rows.Count, "A").End(xlUp).Row If iRow 10 Or Range("A10").Value < "" Then iRow = iRow + 1 Else iRow = 10 End If ' do your copy Range("A" & iRow).Resize(1, 4).Paste -- HTH Bob Phillips "Alex" wrote in message ... Dear ALL I have the following question: I placed the button on the excel sheet and assign a macro which cuts the cells' values from range b1:b4 and pastes them into range a10:d10 everything is ok and works perfectly, but how can I do so that when I press the button again the new values which i type in range b1:b4 placed in a11:d11 ? and so on, is it possible? Please help me with this Thank you in advance |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Show your full code, and how is the button assigned?
-- HTH Bob Phillips "Alex" wrote in message ... Dear Bob thank you for your answer but here i have some questions. Where should i place this code? when i am placing it as a button code i have the error message "Object doesn't support this property or method " could you explain me with step by step? Thank you "Bob Phillips" wrote: Something like iRow = Cells(Rows.Count, "A").End(xlUp).Row If iRow 10 Or Range("A10").Value < "" Then iRow = iRow + 1 Else iRow = 10 End If ' do your copy Range("A" & iRow).Resize(1, 4).Paste -- HTH Bob Phillips "Alex" wrote in message ... Dear ALL I have the following question: I placed the button on the excel sheet and assign a macro which cuts the cells' values from range b1:b4 and pastes them into range a10:d10 everything is ok and works perfectly, but how can I do so that when I press the button again the new values which i type in range b1:b4 placed in a11:d11 ? and so on, is it possible? Please help me with this Thank you in advance |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is code Sub Macro2()
' ' Macro2 Macro ' Macro recorded 7/8/2005 by AI ' ' Range("B1").Select Selection.Cut Range("A10").Select ActiveSheet.Paste Range("B2").Select Selection.Cut Range("B10").Select ActiveSheet.Paste Range("B3").Select Selection.Cut Range("C10").Select ActiveSheet.Paste Range("B4").Select Selection.Cut Range("D10").Select ActiveSheet.Paste End Sub Button is placed from Forms and then a macro is assigned to it. "Bob Phillips" wrote: Show your full code, and how is the button assigned? -- HTH Bob Phillips "Alex" wrote in message ... Dear Bob thank you for your answer but here i have some questions. Where should i place this code? when i am placing it as a button code i have the error message "Object doesn't support this property or method " could you explain me with step by step? Thank you "Bob Phillips" wrote: Something like iRow = Cells(Rows.Count, "A").End(xlUp).Row If iRow 10 Or Range("A10").Value < "" Then iRow = iRow + 1 Else iRow = 10 End If ' do your copy Range("A" & iRow).Resize(1, 4).Paste -- HTH Bob Phillips "Alex" wrote in message ... Dear ALL I have the following question: I placed the button on the excel sheet and assign a macro which cuts the cells' values from range b1:b4 and pastes them into range a10:d10 everything is ok and works perfectly, but how can I do so that when I press the button again the new values which i type in range b1:b4 placed in a11:d11 ? and so on, is it possible? Please help me with this Thank you in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|