Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default help automating the Replace function in Excel

this seems to be that it should be easy, but i am having a heck of a time and any help would be greatly appreciated!

what i have is a protected worksheet. but, i want the users to be able to do a mass replace on their formulas if they wish. you can not do that unless you unprotect the worksheet.

first, i thought i would create a command button on my custom toolbar that simply unprotects the worksheet, uses the bulit-in dialog box of xlDialogFormulaReplace, and then protect the worksheet again. well, it works just fine, except if you use it, it disables the normal Edit menu Find/Replace capability. and i don't want to do that. it doesn't give you any errors, just won't work when you select them from the menu. nothing happens at all.

so, i thought i would make the button unlock the worksheet, then use the Execute method of the popup command that is Replace, from the Edit menu. and then lock the worksheet back up.

well, this works great, i prefer the replace dialog you get from the Edit menu anyway. but, it does the Execute, and doesn't stop, it isn't modal. so it just unlocks, shows the dialog box, and locks right back up before you can use the dialog box!!

i thought i could check the zOrder, but found out that none of these things have that property. the worksheet stays active so i can not use the activate event to lock it back up.

surely someone else has done this!! if so PLEASE let me know how you got around it!

thanks much!!!

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
Need help on Automating a common function Stumped Non-IT-ian Excel Discussion (Misc queries) 5 May 6th 09 09:09 PM
Automating search and replace Wellman Excel Worksheet Functions 2 October 13th 08 03:43 PM
Automating the Excel camera function kaitain Excel Discussion (Misc queries) 0 March 2nd 06 04:28 PM
Need help with automating the updating of a function in worksheet [email protected] Excel Worksheet Functions 4 February 10th 06 03:33 PM
Using REPLACE function in Excel GarryG Excel Discussion (Misc queries) 1 June 17th 05 03:40 AM


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