Solved

Runtime Error 13 Type Mismatch

Posted on 2014-03-10
6
611 Views
Last Modified: 2014-03-10
I am getting this error based on the code below.  Can someone tell why I would get this error?

Dim objChart As Chart
Set objChart = Me.Graph1.Object.Application.Chart
0
Comment
Question by:ICTIndika
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39917392
I think this should be enough:
Dim objChart As Chart
Set objChart = Me.Graph1.Object
0
 

Author Comment

by:ICTIndika
ID: 39917424
I am still getting the same error. I am using Access 2013, I am wondering if I don't have the right library reference.
0
 

Author Comment

by:ICTIndika
ID: 39917477
I have checked I do have the Microsoft Graph 15 object Library reference checked. Is there any other I should have?
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 39917499
what are the references you have activated in your project?
I don't have ms access 2013, so I cannot check what references you have.
can you check with full object type the me.graph1.object would be?
0
 
LVL 12

Expert Comment

by:pdebaets
ID: 39918143
It is interesting that you have a variable named "obj...". Could it be that this is supposed to be a variable of type Object?

Dim objChart As Object

?
0
 

Author Closing Comment

by:ICTIndika
ID: 39919663
After checking I was missing the proper reference.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question