Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old March 4th 08, 02:35 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Mar 2008
Posts: 4
Default runtime error 13 - type mismatch error in Excel 97 on Citrix

Hi

I'm getting a "runtime error 13 - type mismatch" error when running a macro
in a spreadsheet on the company network (accessed via Citrix) at the company
I work for. The line causing the error is identified below:

Range("L1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

There is more code than this, so can supply that if required.

Citrix may be the cause of the problem because the exact same code works
fine when I open the spreadsheet on my desktop pc (using Excel 2000).

Could someone please explain to me what the problem could be, and how it
could be fixed?

Thanks and regards

Kevin Maher

  #2   Report Post  
Old March 4th 08, 02:52 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 35,218
Default runtime error 13 - type mismatch error in Excel 97 on Citrix

If there is an error in the cell, you can get that message.

if iserror(activecell.value) then
'skip it???
else
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
end if



Kevin Maher wrote:

Hi

I'm getting a "runtime error 13 - type mismatch" error when running a macro
in a spreadsheet on the company network (accessed via Citrix) at the company
I work for. The line causing the error is identified below:

Range("L1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

There is more code than this, so can supply that if required.

Citrix may be the cause of the problem because the exact same code works
fine when I open the spreadsheet on my desktop pc (using Excel 2000).

Could someone please explain to me what the problem could be, and how it
could be fixed?

Thanks and regards

Kevin Maher


--

Dave Peterson
  #3   Report Post  
Old March 4th 08, 03:18 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Mar 2008
Posts: 4
Default runtime error 13 - type mismatch error in Excel 97 on Citrix

Thanks Dave, I tried that but it still gave the error on the same line.

It's weird how it spits the dummy when run on the network, but works fine
when run on my desktop machine. It becomes picky for no apparent reason.

I should also point out that the exact same data file is being used on both
occasions - one copy on my machine, the other on the network. Both times the
spreadsheet and data file are in the same folder.

Kevin

"Dave Peterson" wrote:

If there is an error in the cell, you can get that message.

if iserror(activecell.value) then
'skip it???
else
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
end if



Kevin Maher wrote:

Hi

I'm getting a "runtime error 13 - type mismatch" error when running a macro
in a spreadsheet on the company network (accessed via Citrix) at the company
I work for. The line causing the error is identified below:

Range("L1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

There is more code than this, so can supply that if required.

Citrix may be the cause of the problem because the exact same code works
fine when I open the spreadsheet on my desktop pc (using Excel 2000).

Could someone please explain to me what the problem could be, and how it
could be fixed?

Thanks and regards

Kevin Maher


--

Dave Peterson

  #4   Report Post  
Old March 4th 08, 03:39 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 35,218
Default runtime error 13 - type mismatch error in Excel 97 on Citrix

I've never use Citrix.

What's in the cell that causes the error?

How did you change the code?

Kevin Maher wrote:

Thanks Dave, I tried that but it still gave the error on the same line.

It's weird how it spits the dummy when run on the network, but works fine
when run on my desktop machine. It becomes picky for no apparent reason.

I should also point out that the exact same data file is being used on both
occasions - one copy on my machine, the other on the network. Both times the
spreadsheet and data file are in the same folder.

Kevin

"Dave Peterson" wrote:

If there is an error in the cell, you can get that message.

if iserror(activecell.value) then
'skip it???
else
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
end if



Kevin Maher wrote:

Hi

I'm getting a "runtime error 13 - type mismatch" error when running a macro
in a spreadsheet on the company network (accessed via Citrix) at the company
I work for. The line causing the error is identified below:

Range("L1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

There is more code than this, so can supply that if required.

Citrix may be the cause of the problem because the exact same code works
fine when I open the spreadsheet on my desktop pc (using Excel 2000).

Could someone please explain to me what the problem could be, and how it
could be fixed?

Thanks and regards

Kevin Maher


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Old March 4th 08, 04:04 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2007
Posts: 14
Default runtime error 13 - type mismatch error in Excel 97 on Citrix

Hi Kevin,

It looks to me as if some of your cells do not contain numerical numbers
which is causing the crash. Excel is trying to evaluate the cell for zero
but finding a null or text value of "" instead.

A quick fix is to make sure all numbers have at minimum a zero value to fill
them up.

A better solution is to add some code to evaluate the cell for non-numerical
content first like:

If Isnull(Activecell) = False and ActiveCell.Value = 0 then

I think thats the right code, its awhile since I've done this.

Cheers

"Kevin Maher" wrote:

Hi

I'm getting a "runtime error 13 - type mismatch" error when running a macro
in a spreadsheet on the company network (accessed via Citrix) at the company
I work for. The line causing the error is identified below:

Range("L1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

There is more code than this, so can supply that if required.

Citrix may be the cause of the problem because the exact same code works
fine when I open the spreadsheet on my desktop pc (using Excel 2000).

Could someone please explain to me what the problem could be, and how it
could be fixed?

Thanks and regards

Kevin Maher



  #6   Report Post  
Old March 8th 08, 12:28 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Mar 2008
Posts: 4
Default runtime error 13 - type mismatch error in Excel 97 on Citrix

There's nothing in the cell at all tha tI can see - it's blank, or else is
one that will contain text.

I changed the code simply by going into the Macros area and editing the code
from there. I did that in Excel 2000 so I'm wondering whether editing it in
that has done something that Excel 97 can't handle, maybe?

Kevin

"Dave Peterson" wrote:

I've never use Citrix.

What's in the cell that causes the error?

How did you change the code?

Kevin Maher wrote:

Thanks Dave, I tried that but it still gave the error on the same line.

It's weird how it spits the dummy when run on the network, but works fine
when run on my desktop machine. It becomes picky for no apparent reason.

I should also point out that the exact same data file is being used on both
occasions - one copy on my machine, the other on the network. Both times the
spreadsheet and data file are in the same folder.

Kevin

"Dave Peterson" wrote:

If there is an error in the cell, you can get that message.

if iserror(activecell.value) then
'skip it???
else
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
end if



Kevin Maher wrote:

Hi

I'm getting a "runtime error 13 - type mismatch" error when running a macro
in a spreadsheet on the company network (accessed via Citrix) at the company
I work for. The line causing the error is identified below:

Range("L1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

There is more code than this, so can supply that if required.

Citrix may be the cause of the problem because the exact same code works
fine when I open the spreadsheet on my desktop pc (using Excel 2000).

Could someone please explain to me what the problem could be, and how it
could be fixed?

Thanks and regards

Kevin Maher

--

Dave Peterson


--

Dave Peterson

  #7   Report Post  
Old March 8th 08, 12:33 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Mar 2008
Posts: 4
Default runtime error 13 - type mismatch error in Excel 97 on Citrix

Thanks for your suggestion, Lewis. I tried that and just like before, it
didn't work in 97 but did work fine in 2000. The code can handle cells that
are blank or don't contain numbers ok - at least, on paper it does - but the
version of Excel seems to determine whether or not it will run successfully.

I mentioned in my reply to Dave Peterson that I did most of my editing in
Excel 2000, so am wondering whether 2000 made some small alteration to the
code/spreadsheet somewhere that 97 can't handle?

Cheers

Kevin

"Lewis" wrote:

Hi Kevin,

It looks to me as if some of your cells do not contain numerical numbers
which is causing the crash. Excel is trying to evaluate the cell for zero
but finding a null or text value of "" instead.

A quick fix is to make sure all numbers have at minimum a zero value to fill
them up.

A better solution is to add some code to evaluate the cell for non-numerical
content first like:

If Isnull(Activecell) = False and ActiveCell.Value = 0 then

I think thats the right code, its awhile since I've done this.

Cheers

"Kevin Maher" wrote:

Hi

I'm getting a "runtime error 13 - type mismatch" error when running a macro
in a spreadsheet on the company network (accessed via Citrix) at the company
I work for. The line causing the error is identified below:

Range("L1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

There is more code than this, so can supply that if required.

Citrix may be the cause of the problem because the exact same code works
fine when I open the spreadsheet on my desktop pc (using Excel 2000).

Could someone please explain to me what the problem could be, and how it
could be fixed?

Thanks and regards

Kevin Maher

  #8   Report Post  
Old March 8th 08, 12:48 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 35,218
Default runtime error 13 - type mismatch error in Excel 97 on Citrix

It could be the way xl97 handles comparisons to numbers. I don't recall the
details, but I remember seeing posts that said that there were differences.

Maybe you could test:

Range("L1").Select
Do Until ActiveCell.Value = ""
if isnumeric(activecell.value) then
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
else
ActiveCell.Offset(1, 0).Select
end if
Loop

Kevin Maher wrote:

There's nothing in the cell at all tha tI can see - it's blank, or else is
one that will contain text.

I changed the code simply by going into the Macros area and editing the code
from there. I did that in Excel 2000 so I'm wondering whether editing it in
that has done something that Excel 97 can't handle, maybe?

Kevin

"Dave Peterson" wrote:

I've never use Citrix.

What's in the cell that causes the error?

How did you change the code?

Kevin Maher wrote:

Thanks Dave, I tried that but it still gave the error on the same line.

It's weird how it spits the dummy when run on the network, but works fine
when run on my desktop machine. It becomes picky for no apparent reason.

I should also point out that the exact same data file is being used on both
occasions - one copy on my machine, the other on the network. Both times the
spreadsheet and data file are in the same folder.

Kevin

"Dave Peterson" wrote:

If there is an error in the cell, you can get that message.

if iserror(activecell.value) then
'skip it???
else
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
end if



Kevin Maher wrote:

Hi

I'm getting a "runtime error 13 - type mismatch" error when running a macro
in a spreadsheet on the company network (accessed via Citrix) at the company
I work for. The line causing the error is identified below:

Range("L1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 0 Then <<--- this line
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

There is more code than this, so can supply that if required.

Citrix may be the cause of the problem because the exact same code works
fine when I open the spreadsheet on my desktop pc (using Excel 2000).

Could someone please explain to me what the problem could be, and how it
could be fixed?

Thanks and regards

Kevin Maher

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


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
xpath error? Runtime Error 13 type mismatch Steve M[_2_] Excel Discussion (Misc queries) 0 January 17th 08 02:16 AM
xpath error? Runtime Error 13 type mismatch SteveM Excel Discussion (Misc queries) 1 December 4th 07 10:16 AM
VB error, runtime error 13 (type mismatch) hindlehey Excel Programming 2 November 8th 05 01:37 AM
Runtime Error 13 - type mismatch hindlehey Excel Discussion (Misc queries) 1 November 7th 05 03:51 PM
Runtime error 13 type mismatch ? JoeH[_16_] Excel Programming 0 September 25th 04 06:44 PM


All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017