Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default mismatch error and Variants

It seems strange to me that you must declare each integer one at a time. But
if that's the way it must be done...

Anyway, thank you for the replies.

"mudraker" wrote:


Tony

Jim is correct if you declared your variables in your macros as you
have in your posted code
Dim i, j, k, l As Integer
It is only the last variable that is declared as a Integer

You need to use
Dim i as Integer
Dim J as Integer
Dim K as Integer

If you modify your declartions as above in all your macros

You can turn on the Option Explicit for all new workbooks & modules by
going to Tools Options Editor Tab Require Variable Declaration

or having the very 1st entry on your modules as
Option Explicit

Using this option saves a lot debugging problems


--
mudraker
------------------------------------------------------------------------
mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473
View this thread: http://www.excelforum.com/showthread...hreadid=535794


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
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
xpath error? Runtime Error 13 type mismatch Steve M[_2_] Excel Discussion (Misc queries) 0 January 17th 08 01:16 AM
xpath error? Runtime Error 13 type mismatch SteveM Excel Discussion (Misc queries) 1 December 4th 07 09:16 AM
Type Mismatch error & subscript out of range error Jeff Wright[_2_] Excel Programming 3 May 14th 05 07:14 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM


All times are GMT +1. The time now is 09:32 AM.

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"