Mcro is not working

Hi ALL,

while i am trying to delete columns in .xlsm by using macro code but getting this error

excel

i want to delete these unwanted columns

Thank you

Hello @vineelag
You can use the Clear range activity in Excel application Scope- Modern
image

If You are a classic user, Follow this to enable Modern Activities
Activity pannel> Click Filter> Select the Show modern, then search the Modern Excel activities.
image

@Gokul_Jayakumar, Thank you

but i am not allowed to use modern, present i am am working on old version.

@vineelag

Please try this

Sub delete()

Activesheet.Columns("G:R").Delete

End sub

Cheers

I just consider the solution as Deleted the columns before move into the logic.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.