Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have been reading the following item:-
http://msdn.microsoft.com/library/de...heetranges.asp and it uses the following code:- Dim ws As Excel.Worksheet = _ DirectCast(ThisWorkbook.Worksheets(1), Excel.Worksheet) Dim rng, rng1, rng2 As Excel.Range but when I try and use it, the first two lines show up in red in the VBA editor. Is there a reason for this? I am using Excel 2000, is there an add-in or something I need to use the "DirectCast"? Basically I am after a few pointers on how to refer to worksheet ranges from code but am getting stuck. Thanks Andi |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to refer to a cell format code? | Excel Discussion (Misc queries) | |||
Formula to refer to other worksheet... | Excel Worksheet Functions | |||
More then 1 Excel object running at same time , how can I refer to right one in code? | Excel Programming | |||
refer to the sheets Name property in my code (not what is on the Tab) | Excel Programming | |||
XL 2000: automating drag-and-drop for worksheet ranges. Using Code! | Excel Programming |