I keep track of my transactions in different sheets, i have a button that activates a new row along with formulas. Some sheets work fine, others don't. All run the same code.
HTML Code:
I keep track of my transactions in different sheets, i have a button that activates a new row along with formulas. Some sheets work fine, others don't. All run the same code.
HTML Code:
Hi from rainy Seattle,
Look at the different sheets and see if:
1. Merged cells are involved in the inserts?
2. What cell are you in when trying to do this insert?
3. Might you be in the middle of a table or pivot or chart?
Are you trying to insert rows or columns? I think rows don't need the quotes while columns do.
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Are you trying to insert rows or columns? one ROW
There about 10 columns where the formatting is transferred to the new row but the "balance" column doesn't get the formula transferred.
After reading this page:
https://www.wallstreetmojo.com/vba-insert-row/
it looks like what you have should work.
What happens if you use
Does this work?Please Login or Register to view this content.
I still think you have some merged cells somewhere you are trying to insert.
Does it work if you remove the CopyOrigin:= .. part of the command?
Hi mainerain,
After reading more at: https://stackoverflow.com/questions/...t-in-excel-vba
that code tells VBA how it is supposed to format the new row you are inserting. What if the two cells have different cell formats? What is one is Bold and the other isn't but is underlined? Which should VBA use for the new row's format?? Perhaps it throws this error because there are two different formats. I also wonder by using this extra parameter, what single cell is it using for doing its "Right" and "Below". See if the activecell makes a difference when it gives an error.
I don't get it. I've tried different things. I see no merged cells associated with the row that is copied.
I have one sheet that has this formula in cell H8:
HTML Code:
Then when I insert the row it morphs into this:
I'm just a newbie. I don't know what I don't know.HTML Code:
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks