totonicknick
12-19-2022, 12:25 PM
30407
Hello,
I have an Excel with macros. Everything was working fine for several months and I changed nothing to the code or parameters.
Today I am suddenly unable to insert new rows or columns. I am sure it worked a few days ago, because I used a macro that used the following line and it worked:
Worksheets(ActiveSheet.Name).Cells(5 + CurrentRowsUpdated, 1).EntireRow.Insert
Up to Worksheets(ActiveSheet.Name).Cells(5 + CurrentRowsUpdated, 1).EntireRow, everything works fine (I tested it in the immediate window and with message boxes). But when we get to the "Insert" part, I get the following error:
Run-time error '1004':
Insert method of Range class failed
Following that, I tried to just insert a row or column in the regular way. It doesn't work, but it unhides the last row.
I also tried it on a new, empty tab, it still doesn't work.
If I open another excel however, it works just fine.
I'm at my wits' end, can't figure out why it suddenly acts like that. Can anyone help me?
For those who want to open the Excel, here's how to use it:
Open file and accept macros
Go to the « Projects » tab et note down your projects
Go to the « General » tab
Click on « Show days in Timesheet »
Click on « Quick Access To Month »
Select a month and a year and press « Create Worksheet »
Fill in the timesheet
What to do if a new project is used or an old one isn't used anymore?
Go to the « Projects » tab
Add projects :
To remove a project: Delete line
SORT if required
Go to tab YYYY_MMMM (for example 2022_October) that you want to update
Click on "Update"
New projects should automatically appear at the end
Deleted projects will be removed if 0 hours are chosen for that month
When you close the excel and open it again, you will be redirected to the "General" tab and can click on the « Go To Today’s tab » button to go to today's date.
Hello,
I have an Excel with macros. Everything was working fine for several months and I changed nothing to the code or parameters.
Today I am suddenly unable to insert new rows or columns. I am sure it worked a few days ago, because I used a macro that used the following line and it worked:
Worksheets(ActiveSheet.Name).Cells(5 + CurrentRowsUpdated, 1).EntireRow.Insert
Up to Worksheets(ActiveSheet.Name).Cells(5 + CurrentRowsUpdated, 1).EntireRow, everything works fine (I tested it in the immediate window and with message boxes). But when we get to the "Insert" part, I get the following error:
Run-time error '1004':
Insert method of Range class failed
Following that, I tried to just insert a row or column in the regular way. It doesn't work, but it unhides the last row.
I also tried it on a new, empty tab, it still doesn't work.
If I open another excel however, it works just fine.
I'm at my wits' end, can't figure out why it suddenly acts like that. Can anyone help me?
For those who want to open the Excel, here's how to use it:
Open file and accept macros
Go to the « Projects » tab et note down your projects
Go to the « General » tab
Click on « Show days in Timesheet »
Click on « Quick Access To Month »
Select a month and a year and press « Create Worksheet »
Fill in the timesheet
What to do if a new project is used or an old one isn't used anymore?
Go to the « Projects » tab
Add projects :
To remove a project: Delete line
SORT if required
Go to tab YYYY_MMMM (for example 2022_October) that you want to update
Click on "Update"
New projects should automatically appear at the end
Deleted projects will be removed if 0 hours are chosen for that month
When you close the excel and open it again, you will be redirected to the "General" tab and can click on the « Go To Today’s tab » button to go to today's date.