Thread: Dim problems
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
kittronald kittronald is offline
external usenet poster
 
Posts: 162
Default Dim problems

What is the problem with the following ?

Dim r As Integer
Dim s As String

r = Application.Count(Sheet1.Range("Set_Size_Range"))
s = ActiveWorkbook.Names("Set_Size").RefersTo

If r = s Then



When the IF line executes, a "Run-time error '13': Type mismatch" error
occurs.

The following are the debug.print outputs

r equals 126

s equals =ABS(MIN(Data_Header_Row))

If you type =Set_Size in a cell, the value returned is 126.

What is the syntax for assigning the value of the name "Set_Size" to the
variable s ?



kittronald