View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default code fails if graph is selected

When the graph is selected there is no activesheet so

if activesheet is nothing then
msgbox "Sorry... Please de-select the graph before continuing..."
else
columns("B").Select
--
HTH...

Jim Thomlinson


"Scott" wrote:

This code fails if a graph on the same sheet is selected (clicking inside the
graph)

Columns("B:B").Select

If I unselect the graph (clicking ouside the graph) then code runs fine.

What can I put in the code to make sure the graphs are not selected?