Strange result inserting row

Gregfox

Board Regular
Joined
Apr 12, 2011
Messages
120
Hi all I've worked 2 hours trying to determine the problem with the following simple code:
Code:
Sheet1.Rows(3).insert      'Insert a new row at Row3
When I run it on a blank workbook/worksheet it works just fine, however when I run it on a
workbook/worksheet with data it just passes (in single step) this code and does nothing. ??
Using 2007 on a PC non-protected workbook.

 
What did the message say when you tried the code I suggested?
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
It had no message and I was able to step through it, but no new line.
I'm pretty happy with what I have now.
 
Upvote 0
Ok (but you couldn’t not get a message with the code I suggested as that’s all it was!)
 
Upvote 0
Yes, and the program stepped through it but no line was inserted, there must me something stopping this code from executing. The code I posted did work and I think it's time to move on.
Thank you for you aid!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top