Forum

Macro file not runn...
 
Notifications
Clear all

Macro file not running for corresponding weeks

8 Posts
2 Users
0 Reactions
90 Views
(@hitesh222002)
Posts: 7
Active Member
Topic starter
 
Hello Guys,
 
I've attached a macro file in this email. It is about automating sales report for 3 different weeks. The macro is supposed to run for 1st, 2nd and 3rd week. However, Iam unable to run the macros for 2nd and 3rd week.
 
I've recorded the macro for the 1st week. However, when I try to automate the same for 2nd and 3rd week, It shows runtime error '1004'. The debugger is showing the error as ".Color = -16383844" highlighted in yellow in the VB page.
 
Do I need to make any changes in the code to make the macro run for 2nd and 3rd week.
 
Even the conditional formatting for 'Charged Off' is not reflecting for the 2nd and 3rd weeks.  
 
 
Posted : 31/12/2020 4:57 am
(@purfleet)
Posts: 412
Reputable Member
 

The attached is a .xlsx file so cant contain a macro, can you uplolad the .xlsm version?

 
Posted : 31/12/2020 3:38 pm
(@hitesh222002)
Posts: 7
Active Member
Topic starter
 

Sure

There you go .. The .xlsm file uploaded

 
Posted : 01/01/2021 3:01 am
(@hitesh222002)
Posts: 7
Active Member
Topic starter
 

Please help me with the solution to the problem faced in the macro

 
Posted : 05/01/2021 8:28 am
(@purfleet)
Posts: 412
Reputable Member
 

Still no .xlsm file

 
Posted : 07/01/2021 12:29 am
(@hitesh222002)
Posts: 7
Active Member
Topic starter
 

Iam sorry about that.

Let me try uploading the file again and hope it works this time.

 
Posted : 07/01/2021 5:12 am
(@hitesh222002)
Posts: 7
Active Member
Topic starter
 

Please help me with the solution to the macro file.

 
Posted : 11/01/2021 7:35 am
(@purfleet)
Posts: 412
Reputable Member
 

I fear that it would take quite a while to iron out all the parts that need correcting in your code.

the code inserts the same column each time its run, which i guess was not the intention? The contents of coilumn H are then deleted

Half way through the code Week_3 is being referenced, which means that code is acting on that worksheet only. After that you make cell K6 change to delinquent then changed to Charged off

The is also limited to rows up to 501.

If i was you i would forget about the formatting at the moment and just concentrate on getting the marco to do what it needs to then add the formatting after when you know it works.

 
Posted : 11/01/2021 4:48 pm
Share: