View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leslie Leslie is offline
external usenet poster
 
Posts: 4
Default InsertRowsAndFillFormulas


Thanks, David. Yes, I did mean your macro from your web page. I could swear that was one of the things I tried yesterday that didn't work, but I guess not because when I did it today it worked. Anyway, here's the thing. I have the macro in a Worksheet_Activate() paragraph. So now what happens is....it inserts a new row if I click to sheet2 and then back to sheet1, but not when I open the worksheet. Any suggestions
----- David McRitchie wrote: ----

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

comment out the following cod

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

as follows

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


The macro can be used as modiifed to insert 1 row, but still retai
the option to insert a specified number of rows if the optiona
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.ht
Search Page: http://www.mvps.org/dmcritchie/excel/search.ht

"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. Eac

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 d
that. I was not successful. I'd appreciate any help you can give me
Thank
Lesli