VBA error while deleting tab

Asked

Viewed 29 times

1

My dear good day!

I need your help with the code below.

Sub atualizar()

Application.DisplayAlerts = False

Sheets("Reembolso").Delete

Application.DisplayAlerts = True

Sheets("Modelo").Copy after:=Sheets(ThisWorkbook.Worksheets.Count)

Sheets("Modelo (2)").Name = "Reembolso"

End Sub

When you arrive at the "Sheets("Refund") line. Delete" it displays the error "Unable to insert interrupt mode at this time" and to.

I tried to enter the command "On error" and nothing helped. I ran the part under the code and debugged right.

This spreadsheet has some other tabs that are hidden, I did the test a spreadsheet the part with only two tabs and ran.

Can anyone tell me where I’m going wrong?

Thank you very much.

1 answer

2

I managed to solve, the tab in question was using two buttons of Activex, I put as normal items and changed to assign macro. Now it’s all going round.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.