Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default How do you ignor File Not Found Dialog Popup ?

Workbooks("Master.xls").Worksheets("UpdatedList"). Cells(rw, 2).FormulaR1C1 =
"='[" & FileName & "]PointCount'!R2C5"

The above is my line of code that inserts a formula into a cell in my
Master.xls workbook the formula links to a value in the worksheet called
PointCount from multiple different workbooks. the problem is that if the
program encounters a workbook that does not have a worksheet named
"PointCount" I get a pop up FileNotFound window asking me to browse to the
file that has the worksheet "PointCount" I do not want it to do this. Is
there a way to have my macro skip over these files or suppres the "File Not
Found" Pop up from poping up ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How do you ignor File Not Found Dialog Popup ?

Hi Dan

You can test it with a Excel4 macro like I do here
http://www.rondebruin.nl/summary2.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dan Thompson" wrote in message ...
Workbooks("Master.xls").Worksheets("UpdatedList"). Cells(rw, 2).FormulaR1C1 =
"='[" & FileName & "]PointCount'!R2C5"

The above is my line of code that inserts a formula into a cell in my
Master.xls workbook the formula links to a value in the worksheet called
PointCount from multiple different workbooks. the problem is that if the
program encounters a workbook that does not have a worksheet named
"PointCount" I get a pop up FileNotFound window asking me to browse to the
file that has the worksheet "PointCount" I do not want it to do this. Is
there a way to have my macro skip over these files or suppres the "File Not
Found" Pop up from poping up ?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default How do you ignor File Not Found Dialog Popup ?

I think I'd use the FileExists method to determine if the file did exist
before entering the formula in a cell.

http://msdn.microsoft.com/en-us/libr...5t(VS.85).aspx

when I use it, I enter the full path in filespec. I've tweaked the code to
make the function return a boolean TRUE/FALSE and execute other actions based
on that result.
--
HTH,

Barb Reinhardt



"Dan Thompson" wrote:

Workbooks("Master.xls").Worksheets("UpdatedList"). Cells(rw, 2).FormulaR1C1 =
"='[" & FileName & "]PointCount'!R2C5"

The above is my line of code that inserts a formula into a cell in my
Master.xls workbook the formula links to a value in the worksheet called
PointCount from multiple different workbooks. the problem is that if the
program encounters a workbook that does not have a worksheet named
"PointCount" I get a pop up FileNotFound window asking me to browse to the
file that has the worksheet "PointCount" I do not want it to do this. Is
there a way to have my macro skip over these files or suppres the "File Not
Found" Pop up from poping up ?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How do you ignor File Not Found Dialog Popup ?

Hi Barb

Dan want to test the worksheet name, not the workbook name

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Barb Reinhardt" wrote in message
...
I think I'd use the FileExists method to determine if the file did exist
before entering the formula in a cell.

http://msdn.microsoft.com/en-us/libr...5t(VS.85).aspx

when I use it, I enter the full path in filespec. I've tweaked the code to
make the function return a boolean TRUE/FALSE and execute other actions based
on that result.
--
HTH,

Barb Reinhardt



"Dan Thompson" wrote:

Workbooks("Master.xls").Worksheets("UpdatedList"). Cells(rw, 2).FormulaR1C1 =
"='[" & FileName & "]PointCount'!R2C5"

The above is my line of code that inserts a formula into a cell in my
Master.xls workbook the formula links to a value in the worksheet called
PointCount from multiple different workbooks. the problem is that if the
program encounters a workbook that does not have a worksheet named
"PointCount" I get a pop up FileNotFound window asking me to browse to the
file that has the worksheet "PointCount" I do not want it to do this. Is
there a way to have my macro skip over these files or suppres the "File Not
Found" Pop up from poping up ?


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
Module & Popup dialog ORLANDO V[_2_] Excel Discussion (Misc queries) 2 July 18th 07 06:50 PM
"File Not Found" dialog box Leslie Coover Excel Programming 0 March 6th 07 01:33 PM
Creating Custom Dialog Boxex (Popup) Brad Sumner Excel Discussion (Misc queries) 9 June 17th 05 02:14 PM
Popup login dialog Daisy[_3_] Excel Programming 0 April 29th 04 02:16 PM
Disable "File Not Found" dialog box Sandy[_3_] Excel Programming 4 September 4th 03 03:05 AM


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