Objects missing from sheet but remain

Mr Wizard2

New Member
Joined
Feb 22, 2014
Messages
9
This is really strange. I have a fairly extensive VBA Excel 2010 project going. Among other things I have a group of options: optAgentMail, optAgentHold, and optAgentWire. During the program, the default condition is hidden. During the program, they are made visible. At the end of the program after they are once more hidden with .visible=False. That's as far as it goes. I have other objects doing the same thing.

My problem is when they are made visible eather by program of by going into design mode, they are not there. The code remains and I cannot create another object with the same name. I have even searched every cell to the right and cannot find them just in case I somehow moved them. They are not there either. I have gone over and over the code using F8 and see nothing different from the others or would somehow delete them. I can see them in the Object Browser but just can't find them on the spreadsheet. Since I can't see them I can't select them and therefore I can't use them or delete them.

Where could they have gone and how do I recover them? I don't want to have to create another set of objects and then modify all the references to the object under a different name. Please educate me.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Try this:
• Home.Find&Select.Selection_Pane

If they are listed there...then they exist. See if you can select them. Or, on the VBA Immediate window, enter code to make one visible:
Code:
MyObject.Visible = True
and see if it becomes available.

Does that help?
 
Upvote 0
Try this:
• Home.Find&Select.Selection_Pane

If they are listed there...then they exist. See if you can select them. Or, on the VBA Immediate window, enter code to make one visible:
Code:
MyObject.Visible = True
and see if it becomes available.

Does that help?

Already done everything you suggested but did them again. I can't select them if I can't see them.
sheet2.optAgent2Hold.visible gives invalid use of property.
 
Upvote 0
Try this code:
Code:
Sub ShowAllShapes()
Dim ws As Worksheet
Dim shp As Shape

Set ws = ActiveSheet
For Each shp In ws.Shapes
    shp.Visible = msoTrue
Next shp

End Sub
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top