473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

application defined error - VBA

Hi,

I have an excel sheet that is loaded with a dynamic result set of data. Column C2 depends on A2 Column data. The following code throws an 'Applicaton-defined or object-defined error':
Expand|Select|Wrap|Line Numbers
  1. Sheet1.Activate
  2. With ActiveWorkbook.ActiveSheet.Range("C2").Validation
  3. .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
  4. xlBetween, Formula1:= _
  5. "=OFFSET(regionstart, MATCH(A2, BookElement,0)-1,1,COUNTIF(BookElement,A2),1)"
  6. .IgnoreBlank = True
  7. .InCellDropdown = True
  8. .InputTitle = ""
  9. .ErrorTitle = "Error"
  10. .InputMessage = ""
  11. .ErrorMessage = "You can only choose from the list."
  12. .ShowInput = True
  13. .ShowError = True
  14. End With
  15. Range("C2").Select
  16. Selection.AutoFill Destination:=Range("C2:C1000"), Type:=xlFillDefault
  17.  
bye
Murugavel
Nov 23 '09 #1
1 1665
MikeTheBike
639 Expert 512MB
Hi

I strongly suspect that the 'MATCH(A2, BookElement,0)' part of the condition formula returns an error, but obviously I can not prove this!?

MTB
Nov 23 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project:...
6
by: beav At wn DOT com DOT au | last post by:
Students at the school where I work are getting the error "Application-defined or object-defined error." when trying to document their Access databases. If you open the documenter window, select a...
2
by: news.microsoft.com | last post by:
hi, I am new in ASP.NET i make a page using Visual Studio.net compile and successfully run on local system but when i upload it on my internet live server it always gives me the same error if...
10
by: Steve Taylor | last post by:
I am having trouble understanding the ASP.NET application boundaries. Here's my setup: 1. Win2003 Server with IIS 6 and an application defined at the root "SalesNow" (www.salesnow.com). 2. A...
1
by: Integra | last post by:
I have developed a VB application with Access running very well except some systems which doesnt installed VB. Created the setup with Innosetup. But its working in some systems eventhough vb not...
0
by: ewarts | last post by:
Hello all, I keep getting the following error whenever i execute a access program. The program is supposed to retrieve data from the source database and then put it into an excel spreadsheet then...
2
by: LeoK | last post by:
After finally completing my database I was ready to transfer it to our client, but when the access database was opened, everything works great, except for the SEND_EMAIL part, whenever any code that...
7
by: JFKJr | last post by:
Hi! I am a new beginner to MS Access VBA, I wrote the following VBA code in Access which deletes blank columns and rows in excel file. But, the code works fine for sometimes and sometimes it displays...
1
by: BobLewiston | last post by:
I tried to compile a Windows Forms Application in Visual C# 2008 Express with this source code from the CSharpSchool tutorial at Programmer's Heaven:using System; using System.Windows.Forms; using...
0
by: grego9 | last post by:
When I run the following macro in Excel (using VBA) I get the run time error 1004 application defined or object defined error. I get the usual debug message and when I click end I actually get the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.