Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable "select sheet" prompt


I am working on a utility that loops through every cell and based o
some rules either leaves the formula with no changes, or performs som
modifications on it before putting in back. So far works fine excep
when it finds a direct reference to an external file. If the referenc
is correct, that is both file and sheet exists, then my process ru
well. BUT when it finds the workseet but the name of the sheet doesn'
exist, Excel popsup with a "select sheet" prompt. I don't want that t
happen.
I have disabled alerts and calculation to manual. The effect is th
same as pressing F2 on it and enter. Excel popsup and asks me to selec
a sheet. Since this interrupts my process I would like for Excel jus
to take the link as is, and place the #REF on the cell. This way I ca
loop through all cells non-stop and later deal with those formulas tha
are linking to non-existant sheets.
I had the same problem when the formula was linking to an non-existan
file; Excel would promot to select a file since the "file was no
found". I deviced a workaround this, but I can't find a workaround th
"select sheet" prompt

--
jrfalc
-----------------------------------------------------------------------
jrfalck's Profile: http://www.excelforum.com/member.php...fo&userid=1666
View this thread: http://www.excelforum.com/showthread.php?threadid=31877

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable "select sheet" prompt


I didn't think it was a hard question. Nobody out there has an answer??

--
jrfalc
-----------------------------------------------------------------------
jrfalck's Profile: http://www.excelforum.com/member.php...fo&userid=1666
View this thread: http://www.excelforum.com/showthread.php?threadid=31877

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Disable "select sheet" prompt

Peppering your code with:
Sendkeys "{esc}"
may work to dismiss that dialog.

maybe you could validate the new sheet before you attempt the change.

There was a long discussion just recently:

http://google.com/groups?threadm=Iva...rum-nospam.com

This seemed to work ok, but slightly irritating.

Option Explicit
Sub testme01()

Dim myNewFormula As String
Dim myCell As Range

With ActiveSheet
Set myCell = .Range("a1")
myNewFormula = Replace(myCell.Formula, "book10", "book99")

If IsError(.Evaluate(myNewFormula)) Then
Application.SendKeys "{ESC}"
End If
myCell.Formula = myNewFormula
End With

End Sub

Interestingly, in xl2002, I couldn't change the worksheet name to a sheet that
didn't exist. I'm not sure if that's new in xl2002 or if I did something weird.

I tried typing in the non-existent sheet name and it reverted back. I couldn't
do it in code. I couldn't do an Edit|replace|replace all.

I changed the workbook name in my sample code.

jrfalck wrote:

I didn't think it was a hard question. Nobody out there has an answer???

--
jrfalck
------------------------------------------------------------------------
jrfalck's Profile: http://www.excelforum.com/member.php...o&userid=16667
View this thread: http://www.excelforum.com/showthread...hreadid=318770


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable "select sheet" prompt


Thanks, it worked. It's just a little annoying since the replace formul
procedure was in one of the runs replacing formulas in more than 5
cells, all the flickering in the screen of "cancel" prompts bein
exceuted got to be a little annoying. But it works

--
jrfalc
-----------------------------------------------------------------------
jrfalck's Profile: http://www.excelforum.com/member.php...fo&userid=1666
View this thread: http://www.excelforum.com/showthread.php?threadid=31877

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
Disable autoformat of "true" and "false" text drs207 Excel Discussion (Misc queries) 6 April 14th 23 05:33 PM
how can I disable "cutting cells" and "drag and drop "in excel ? mwoody Excel Worksheet Functions 4 August 25th 08 03:53 PM
is it possible to disable "save" prompt in excel file on web server? [email protected] Excel Discussion (Misc queries) 0 May 9th 07 05:58 PM
Questionnaire sheet: Select "yes" or "no," and only one can be selected bpatterson Excel Worksheet Functions 2 April 13th 06 11:04 PM
How can I get "File Close" to prompt me to "Save Changes" ?? Charles Jordan Excel Programming 4 July 31st 03 04:01 PM


All times are GMT +1. The time now is 09:40 AM.

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

About Us

"It's about Microsoft Excel"