Thread: Excel Macros
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Brock Brock is offline
external usenet poster
 
Posts: 6
Default Excel Macros

Sub Macro6()
'
' Macro6 Macro
' Macro recorded 05/09/2006 by brock
'

'
Rows("25:25").Select
Selection.Insert Shift:=xlDown
Range("C24:R24").Select
Selection.AutoFill Destination:=Range("C24:R25"), Type:=xlFillDefault
Range("C24:R25").Select
End Sub

"Dave F" wrote:

OK, to view the code, right-click the tab in which the macro was recorded,
and select view code. You should see a window with a bunch of programming
code (which is what Excel creates when you record the macro.)

Copy and paste that into this post so that people can see what your code is.
Hard to diagnose without seeing the code.

Dave
--
Brevity is the soul of wit.


"Brock" wrote:

Dave,

Not sure. I'm certainly no expert when it comes to marco writing. All I've
done is selected "record Macro", executed a numer of steps in excel - i.e.
insert row, copy down, type formula to auto number one of the cells in the
inserted row etc. and clicked stop macro and assigned it to the button I have
created. The first time I hit the button the marco works properly. For each
additional time I hit the button the marco inserts a row above the first one
that it inserted which does not work for me because each additional row added
in suppose to be numbered.

"Dave F" wrote:

What's the code that you're using?
--
Brevity is the soul of wit.


"Brock" wrote:

I have created a Template in Excel to be used for capital budgeting purposes.
One area of the spreadsheet has a series of preformatted rows for users to
input "Assumptions" supporting their analysis contained in the spreadsheet.
I have added a button on the spreadsheet that when clicked is suppose to add
additional preformatted "Assumptions" rows below those in the original
template if necessary. I have created a macro to do said task and assigned
it to the button. My problem is that the macro I created always inputs the
new row above the row that I originally selected when I recorded the macro
instead of following the last added row. Is there any way that I can record
a macro that will only add new rows below those already created either in the
original template or subsequently by running the macro. Your assistance
would be greatly appreciated.