What does this error mean. Help.

A

Ayo

Run-time error '438': Object doesn't support this property or method
I get the above error when the Worksheet array code below is executed even
though the code line action is performed, I don't know what the error means
and I can't figure out what is wrong.

If ThisWorkbook.Name<> "RFDS Tracker GA Market.xls" then
Worksheets(Array("RFDS Tracker", "RFDS Tracker (2)")).Delete
End if
 
J

Jim Thomlinson

Those lines of code are perfectly valid. Are you sure that this is where the
error is being generated? If so are you sure it is not an error 9 subscript
out of range which would indicate that one or more of the sheets you intend
to delete do not exist.
 
A

Ayo

Thanks Jim. I figured it out.

If ThisWorkbook.Name <> "RFDS Tracker GA Market.xls" Then
Worksheets(Array("RFDS Tracker", "RFDS Tracker (2)")).Select
ActiveWindow.SelectedSheets.Delete
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top