View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
robbinma[_4_] robbinma[_4_] is offline
external usenet poster
 
Posts: 1
Default Identifying cell types in column using .SpecialCells(xlConstants, xlNumbers)

Hello,

As part of the work I am doing I am trying to go through the columns i
a spreadsheet and identfiy the cell types usin
.SpecialCells(xlConstants, xlNumbers/xlText etc)

I specify the column to check using the following command:
toBeSpecdName = "my sheet"
set tempWs = worksheets.add

Set tempCellRange = Worksheets(toBeSpecdName).Range(Cells(rowStartPos
colStartPos), Cells(rowEndPos, colStartPos))

where the variables are ints.

If I do the set tempCellRange command before the new worksheet i
created then it works but it fails if I do it afterwards it fail
with:
1004 Application error
and the debugger points at the Range command.

I aim to build a string that contains all the types in the column s
users can go and fix any columnns that have problems.

Anyone got any ideas?

Regards,

Mar

--
Message posted from http://www.ExcelForum.com