View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default sheet name referencing

Sorry Nathan, can you explain why you are selecting the chart sheet and then
immediately going back?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"NathanG" wrote in message
...
Thank you Bob. Unfortunately that did not work but I understand the

concept.
The button did nothing when screenupdating was false as it was not showing
the chart sheet on screen.

I welcome any other suggestions

Thanks,

Nathan

"Bob Phillips" wrote:

Not tested, but try

Dim wslastsheet As Worksheet

Application.Screenupdating = False
Set wslastsheet = ActiveSheet
Sheets("ChartGSE").Select
wslastsheet.Activate
Application.Screenupdating = True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"NathanG" wrote in message
...
I have a system where a user can click on a button to view a chart. I

need
to
back button on the chart to return to the previous sheet. The user can

view
the charts on different sheets so referencing one sheet to return to

is
not
suitable. The code I have is

Dim wslastsheet As Worksheet
Set wslastsheet = ActiveSheet
Sheets("ChartGSE").Select
wslastsheet.Activate

(This was suggested yesterday in a reply to a previous msg) The

problem is
that the chart appears for half a second before returning to the

previous
page. The good thing is that is always returns to the previous page,

even
if
the option to view the graph is made from different sheets. Is there a

way
of
stopping this quick view of the chart before it close?

Alternativly the chart could appear in a window (it is currently a

sheet)
which the user could close.

I appreciate any help

Thanks

Nathan