catch a event - OnAction...

leshem

New Member
Joined
Sep 23, 2002
Messages
49
Hi, Good Morning.
maybe someone will have an Idea for the following:
I have a protected worksheet. I am trying to draw a chart on it , so after the whole flow of DialogBoxes I get an Error Message says: you can not create a chart on a protected sheet. for Unprotect use Tools--> ...etc.
I have succeeded to remove the protction by:
CommandBars(1).Controls("C&hart...").OnAction = activesheet.unprotect
Now I need to protect the sheet again when the action is ended, the chart is drawn.
How can I protect the sheet again right on the end of the action, only by Code?

Thanks for your Quick answer.....
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Tom/Ivan,

The show method only works with xlDialogChartWizard if a chart is active. It's not the same as the dialog for adding a chart, which I cannot find in the Dialogs collection. Try it and you will see what I mean.
 
Upvote 0
On 2002-10-14 09:04, Andrew Poulsom wrote:
Tom/Ivan,

The show method only works with xlDialogChartWizard if a chart is active. It's not the same as the dialog for adding a chart, which I cannot find in the Dialogs collection. Try it and you will see what I mean.

Hi Andrew,
Sorry to tell you but I couldnt find the Dialog for adding a chart in the collection either because it does not exists there - as far as I know. you can reach every step of the chart creation dialog by itself but not the whole flow together (which normally include 4 steps - 4 different Dialogs).

this is the practical reason for sticking on the Chart option from the menu and not creating this function allown, which is also the reason for needing the Protect/Unprotect answer in the first place (if you will look at my topic 1st presented).

Also, nice to here that someone else have found it besize myself, meaning it is a buildin problem of the Excel, as I see it.
 
Upvote 0
On 2002-10-14 09:04, Andrew Poulsom wrote:
Tom/Ivan,

The show method only works with xlDialogChartWizard if a chart is active. It's not the same as the dialog for adding a chart, which I cannot find in the Dialogs collection. Try it and you will see what I mean.

thanks Andrew......I thought there was alogical reason....don't really use this myself...
 
Upvote 0

Forum statistics

Threads
1,216,074
Messages
6,128,649
Members
449,462
Latest member
Chislobog

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