LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default AddIn to delete sheet



sorry I think I misunderstood....

for eg If the active workbook contains sheet ABC or DEF then delete the
sheet else run the function.


The code I posted will delete sheets in a workbook depending on their name.

the function gives a calculated result. I just want this function not
to work in certain sheets......


In this situation you could potentially use Activesheet.Name to get the name
of the sheet that is being used:

if activesheet.name < "ABC" then
'Return a value
else
'Return error
end if

This isn't a perfect solution because there is the potential to use this
call calculate on sheet ABC with another sheet selected.

sheets("ABC").calculate

That could potentially return an undesirable result.

That's the best that I can think of. If it's really essential that the
function is not run on the wrong sheet. Say if you want to protect
confidental information, I suggest that you think about redesigning your
system and using the protection of private functions. I know this is what
you're trying to avoid.

The problem with using the sheet name to protect a function is that there is
nothing to stop a user renaming a sheet.


- Rm


"Soniya" wrote:

I think this wont work...

what i am looking for is to restrict the use of a function which is
available through a running Add In which is availbale globally.

the function gives a calculated result. I just want this function not
to work in certain sheets. for eg. if the sheet name is "abc" then
instead of the calculated result an "error" result will also do. in any
other case it shud give the result.

thanks


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't delete an AddIn Martin K.[_2_] Excel Discussion (Misc queries) 3 June 3rd 07 07:48 PM
Addin macro to delete names in current workbook David Iacoponi Excel Programming 2 September 15th 05 06:57 PM
Reference to sheet name in addIn VJ Excel Programming 1 September 29th 04 07:01 PM
Refer to a sheet by (Name) rather than Name from an addin Rob Excel Programming 3 April 30th 04 03:40 PM
Copy sheet from addin jacob Excel Programming 2 April 19th 04 10:52 AM


All times are GMT +1. The time now is 06:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"