Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch" error
when they execute a macro on a spreadsheet I created. Any idea on why this
was created and how I might be able to correct this issue?
Thanks,
Robert
Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch" error
when they execute a macro on a spreadsheet I created. Any idea on why this
was created and how I might be able to correct this issue?
Thanks,
Robert
A type mismatch occurs when you try to assign incompatible data
to a variable. For example
Dim L As Long
L = "a"
will cause a type mismatch error because a numerical data type (L
As Long) cannot hold string data ("a").
It is impossible to diagnose your problem without seeing the
code. When the error occurs, have the client click the Debug
button (assuming the VBA Project is not protected), rather than
the End button. This will cause VBA to display the offending line
of code.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Linking to specific cells in pivot table"
<Linkingtospecificcellsinpivottable@discussions.microsoft.com>
wrote in message
news:2725A258-84E6-41C6-BD1B-047C728993CC@microsoft.com...
> Hi - A client of mine is getting the "Runtime Error Type 13
> Mismatch" error
> when they execute a macro on a spreadsheet I created. Any idea
> on why this
> was created and how I might be able to correct this issue?
>
> Thanks,
>
> Robert
Not without seeing the code.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Linking to specific cells in pivot table"
<Linkingtospecificcellsinpivottable@discussions.microsoft.com> wrote in
message news:2725A258-84E6-41C6-BD1B-047C728993CC@microsoft.com...
> Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch"
error
> when they execute a macro on a spreadsheet I created. Any idea on why
this
> was created and how I might be able to correct this issue?
>
> Thanks,
>
> Robert
I think that's actually "Runtime Error 13: Type Mismatch" - it means you are
trying to use a variable of a particular type (eg integer) in something that
is expecting a different type (eg string). It should break on the line where
the error is assuming the project isn't protected so you should be able to
pick out what's causing the problem.
Jeff
"Linking to specific cells in pivot table"
<Linkingtospecificcellsinpivottable@discussions.microsoft.com> wrote in
message news:2725A258-84E6-41C6-BD1B-047C728993CC@microsoft.com...
> Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch"
> error
> when they execute a macro on a spreadsheet I created. Any idea on why
> this
> was created and how I might be able to correct this issue?
>
> Thanks,
>
> Robert
Almost impossible to answer - if we could see the code it might help,
but (for example) are they expected to input a date in a particular
cell referenced by the macro, or numeric values - in either case, has
data validation been used on these cells because if not, sure as eggs
are eggs, they'll enter dates with full stops when that isn't a valid
seperator, or type the value as a text string - and the macro will then
give a type mismatch.
Linking to specific cells in pivot table wrote:
> Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch" error
> when they execute a macro on a spreadsheet I created. Any idea on why this
> was created and how I might be able to correct this issue?
>
> Thanks,
>
> Robert
You have several good explanations of what a type mismatch error is.
Here is a guess:
Is the client using xl97?
in Excel 97, if the activecell (as an example) contains a text value and you
do
if activecell.Value = 3 then
you will get a type mismatch error.
It is much more sensative to this situation than later versions.
--
Regards,
Tom Ogilvy
"Linking to specific cells in pivot table"
<Linkingtospecificcellsinpivottable@discussions.microsoft.com> wrote in
message news:2725A258-84E6-41C6-BD1B-047C728993CC@microsoft.com...
> Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch"
error
> when they execute a macro on a spreadsheet I created. Any idea on why
this
> was created and how I might be able to correct this issue?
>
> Thanks,
>
> Robert
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks