Ronmac
11-11-2009, 03:04 PM
Hi,
I've looked through the forum to try to solve this particular problem, but can't find an answer that is related.
My macro has a userform which allows the user to input data to be placed into specific rows on one of 20 worksheets. It then autosums Column D (on the current worksheet), placing the autosum val at the bottom. I need that figure to be placed into a specific cell on a worksheet called "TOTALS".
The code is picking up the cell into which the last calculation has been placed, which is always one above the autosum cell. I thought that by instructing the cursor to move one cell down, it would pick up the correct cell. However, it isn't. Would anyone have an idea why not?
This is the code I'm trying to get to work properly...
Worksheets("TOTALS").Range(ActiveCell.offset(1,0)).Value = ActiveCell.Value
Worksheets("TOTALS").Select
End Sub
I am a newbie to VBA and am using a book, the net and forums such as this to teach myself. I'd be grateful for any advice on this particular issue.
Regards,
Ron
I've looked through the forum to try to solve this particular problem, but can't find an answer that is related.
My macro has a userform which allows the user to input data to be placed into specific rows on one of 20 worksheets. It then autosums Column D (on the current worksheet), placing the autosum val at the bottom. I need that figure to be placed into a specific cell on a worksheet called "TOTALS".
The code is picking up the cell into which the last calculation has been placed, which is always one above the autosum cell. I thought that by instructing the cursor to move one cell down, it would pick up the correct cell. However, it isn't. Would anyone have an idea why not?
This is the code I'm trying to get to work properly...
Worksheets("TOTALS").Range(ActiveCell.offset(1,0)).Value = ActiveCell.Value
Worksheets("TOTALS").Select
End Sub
I am a newbie to VBA and am using a book, the net and forums such as this to teach myself. I'd be grateful for any advice on this particular issue.
Regards,
Ron