Home |
Search |
Today's Posts |
#14
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Ryan. Mike gave me an answer that works and your reply taught me
something if I'm understanding correctly. Your Resize...Insert example is like the menu option Insert...Cells...Shift Cells Down as opposed to the Resize...Insert.EntireRow which is a full row insert. That'll help in the future. Thanks again, Robin "Ryan H" wrote: Use this if you want to insert an entire row. Sheets("WTB").Rows(Range("rgWTBaEnd").Row).Resize( intAInsert).EntireRow.Insert Or if you want to insert rows into the range only then: Sheets("WTB").Rows(Range("rgWTBaEnd").Row).Resize( intAInsert).Insert Hope this helps! If so, let me know, click "YES" below. -- Cheers, Ryan "Robin" wrote: Hello Ryan H, After trying the above responses to no avail, I've now tried yours an I get Run Time Error 424 - Object Required. I replaced "Sheet 1" in your example with "WTB" (the name of the worksheet that has range rgWTBaEnd on it.) Three tries, three misses. I'm feeling a bit dumb. But you now understand why I "Titled" my post as I did! :) Thank you, Robin "Ryan H" wrote: This is what I use. Hope this helps! If so, let me know, click "YES" below. ' adds new rows for new data Sheets("Sheet1").Rows(rgWTBaEnd.Row).Resize(intAIn sert).EntireRow.Insert -- Cheers, Ryan "Robin" wrote: I'm pretty good with Access VBA but new to Excel. Isn't there a simple way to go to a cell and insert x number of rows based on an integer variable. The cell I want to go to is rgWTBaEnd and the number of rows I wnat to insert is intAInsert. I can't believe one must do what I'm seeing in this discussion group for something that simple. Help me please. Thanks, Robin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple problem, simple formula, no FUNCTION ! | Excel Worksheet Functions | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
Make it more simple or intuitive to do simple things | Charts and Charting in Excel | |||
simple question, hopefully a simple answer! | Excel Programming |