Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Find/Replace Event or Find/Replace for Protected Sheet ...

Hello -

I have a worksheet that is protected but I would like to allow the
user to do a find/replace in a defined range of that sheet. The cells
of that range are unlocked for editing already.

Is there any way to allow the Find/Replace to work on a protected
sheet?

Alternatively, I was wondering if there is a way to "intercept" the
Find/Replace, unprotect the sheet, have the Find/Replace dialog
executed and then protect the sheet again? Is there something like a
Application.Replace() available somewhere?

Thanks,
Joe

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Find/Replace Event or Find/Replace for Protected Sheet ...

If you set the UserInterfaceOnly property of the Protect method, it allows
your code to operate on a protected sheet. You can get code for doing a
Find/replace by using the macro recorder or looking the VBA help for those
methods of the Range object.

Look in the vba help for tge Protect method of the worksheet. The
userinterfaceonly property must be set with code and is non persistent when
you close the workbook, so it would need to be set in the workbook_open event
or some other appropriate event.

--
Regards,
Tom Ogilvy




"Joe HM" wrote:

Hello -

I have a worksheet that is protected but I would like to allow the
user to do a find/replace in a defined range of that sheet. The cells
of that range are unlocked for editing already.

Is there any way to allow the Find/Replace to work on a protected
sheet?

Alternatively, I was wondering if there is a way to "intercept" the
Find/Replace, unprotect the sheet, have the Find/Replace dialog
executed and then protect the sheet again? Is there something like a
Application.Replace() available somewhere?

Thanks,
Joe


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Find/Replace Event or Find/Replace for Protected Sheet ...

Hello -

Thanks! I think the UserInterfaceOnly property will work for me.

I know that I can call the Cell.Replace function to do a find/replace
but I was wondering how I can make the application-level Find/Replace
dialog appear. The problem with the Cell.Replace() is that the user
will not have the option to enter anything unless I create my own
dialog. Is there a way to do the Ctrl-H which opens this Excel
dialog? Similarily, I am trying to do a spell check but I think that
I have figured out and the UserInterfaceOnly will help.

Thanks,
Joe



On Oct 27, 10:41 am, Tom Ogilvy
wrote:
If you set the UserInterfaceOnly property of the Protect method, it allows
your code to operate on a protected sheet. You can get code for doing a
Find/replace by using the macro recorder or looking the VBA help for those
methods of the Range object.

Look in the vba help for tge Protect method of the worksheet. The
userinterfaceonly property must be set with code and is non persistent when
you close the workbook, so it would need to be set in the workbook_open event
or some other appropriate event.

--
Regards,
Tom Ogilvy



"Joe HM" wrote:
Hello -


I have a worksheet that is protected but I would like to allow the
user to do a find/replace in a defined range of that sheet. The cells
of that range are unlocked for editing already.


Is there any way to allow the Find/Replace to work on a protected
sheet?


Alternatively, I was wondering if there is a way to "intercept" the
Find/Replace, unprotect the sheet, have the Find/Replace dialog
executed and then protect the sheet again? Is there something like a
Application.Replace() available somewhere?


Thanks,
Joe- Hide quoted text -


- Show quoted text -



Reply
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
find replace within sheet or workbook mcphc Excel Programming 5 April 23rd 07 03:28 PM
trying to find #REF! in a formula to replace with a sheet name funkymonkUK[_212_] Excel Programming 5 June 28th 06 11:21 PM
find and replace - replace data in rows to separated by commas msdker Excel Worksheet Functions 1 April 15th 06 01:00 AM
Any way to know in SheetChange event that Find/Replace was invoked? [email protected] Excel Programming 0 March 10th 06 11:07 PM
Find & Replace within Unlocked Cells in a Protected Worksheet DaveyC4S Excel Discussion (Misc queries) 2 October 9th 05 11:12 AM


All times are GMT +1. The time now is 08:00 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"