Spreadsheet opens but is not visible
Spreadsheet opens but is not visible
(OP)
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?
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?





RE: Spreadsheet opens but is not visible
I feel foolish for panicing, and don't see a way to remove this post.
RE: Spreadsheet opens but is not visible
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
RE: Spreadsheet opens but is not visible
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.
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