Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spreadsheet opens but is not visible

Status
Not open for further replies.

jtlearning

Computer
Joined
Aug 2, 2002
Messages
2
Location
US
Help!!!

I did something I can't find my way out of.

I wrote this code in a subroutine

sub delete_embedded_chart()
Sheets("ChartMaster").Select
ActiveSheet.ChartObjects(1).Select
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Selection.Delete
end sub

My spreadsheet no longer displays. When I open it, it seems to be hinding in memory somewhere. I went into the VB Editor and I can see all the objects on the left. If I right-click the "view object" is greyed out.

I have tried several things to make it display, but I don't know how to get it back.

Any ideas?
 
Panic over, I realized that the Excel Application was open so I tried looking on the Window menu, and yes, there is an unhide choice.

I feel foolish for panicing, and don't see a way to remove this post.
 
If you really want to remove it, just Red-Flag the initial post. Then, simply explain that it is not needed. DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
jtlearning,

Glad you solved your problem. I noticed you were hiding the active window in your code. If you still want to do this and subsequently restore it you could use something like the following.

Code:
Sub WindowShow()
Dim Wn As Window

  Set Wn = ActiveWindow
  Wn.Visible = False
'Do stuff here
  Wn.Visible = True
  
  Set Wn = Nothing
End Sub

You need to save a reference to the active window in order to re-set its visibility since it will no longer be the active window after it is hidden.

Hope this helps.
M. Smith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top