View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default InsertRowsAndFillFormulas

Hi Leslie,
I presume you mean the macro from my web page, just so everyone
knows what you are talking about.
http://www.mvps.org/dmcritchie/excel/insrtrow.htm

comment out the following code

vRows = Application.InputBox(prompt:= _
"How many rows do you want to add?", Title:="Add Rows", _
Default:=1, Type:=1) 'type 1 is number
If vRows = False Then Exit Sub

as follows:

vRows = 1
'-- vRows = Application.InputBox(prompt:= _
' -- "How many rows do you want to add?", Title:="Add Rows", _
' -- Default:=1, Type:=1) 'type 1 is number
'-- If vRows = False Then Exit Sub


The macro can be used as modiifed to insert 1 row, but still retain
the option to insert a specified number of rows if the optional
paramter is used when called from another macro.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Leslie" wrote in message ...
I've placed this macro in my worksheet and it works, but I don't want the user to have the option of how many rows to enter. Each

time it is opened it should insert a row. I've not written macros before, but I did try a few things to see if I could make it do
that. I was not successful. I'd appreciate any help you can give me.

Thanks

Leslie