LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Identifying cell types in column using .SpecialCells(xlConstants,xlNumbers)

Another guess: Your code is behind a worksheet and the unqualified range
references belong to the sheet that owns the code--not the newly added
worksheet:

Instead of:
Set tempCellRange = Worksheets(toBeSpecdName).Range(Cells(rowStartPos, _
colStartPos), Cells(rowEndPos, colStartPos))

Try:

with worksheets(tobespecdname)
set tempcellrange = .range(.cells(rowstartpos,colstartpos), _
.cells(rowendpos,colstartpos))
end with

(watch for typos!)

And notice the dots. That means that thing belongs to the previous With's
object (in this case worksheets(tobespecdname).



"robbinma <" wrote:

Hmm.

The command worked ok before the add worksheet and failed afterwards
without any changes to the variables.

I have just found the varType function and this does what I wanted on a
cell level. I wanted to use the Special Cells on a column but the
problem can be solved at a cell level although it will take a bit
longer to run.

Thanks,

Mark

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


--

Dave Peterson

 
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
Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types" roadsidetree Charts and Charting in Excel 15 June 2nd 09 10:53 AM
Identifying the every nth document in a column boby Excel Discussion (Misc queries) 2 May 4th 09 10:33 PM
Identifying the row and column of a table value JHB Excel Discussion (Misc queries) 6 January 28th 09 10:17 PM
Needed: Chart that combines clustered column and stacked column types Gerry Charts and Charting in Excel 3 February 14th 07 02:53 AM
How do I mix column chart types? Ramesh Narasimhan Charts and Charting in Excel 1 July 20th 05 11:23 PM


All times are GMT +1. The time now is 12:40 PM.

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"