LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Leave cell value untouched if Custom Function errors

I have a custom function that uses arguments from the user's worksheet to
find data in an external Access database using ADO, then return it to the
relevant cell. It works fine, but I want to be able to ensure that the custom
function leaves the cell value *untouched* (rather than returning an error
value) if the VBA cannot make the connection to the Access database (e.g. if
the user can't access the database for some reason).

I've tried using Application.Caller to get the cell's original value, but
this doesn't seem to work. Can anyone help?

Thanks,

SB
 
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
custom addin gives #name? errors bh1 Excel Worksheet Functions 4 February 5th 08 06:46 PM
To leave a cell blank following an "IF" function abie26 Excel Worksheet Functions 9 April 11th 07 09:44 PM
referencing active cell works in a sub but not in a custom function RITCHI Excel Worksheet Functions 2 January 14th 07 10:21 AM
using IF function to copy, but leave populated cell alone [email protected] Excel Worksheet Functions 5 May 12th 06 10:39 PM
Communicating errors from a custom function in an add-in Thomas Smith Excel Programming 1 May 26th 04 09:00 AM


All times are GMT +1. The time now is 12:03 PM.

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"