Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
This one is really puzzling me as it seems pretty basic but obviously (unless VBA in excel 2013 has stopped supporting it which is unlikely) I am doing something wrong. I am actually trying to assign a range to an array like so: Dim MyVar as variant MyVar = ActiveWorkbook.Sheets(1).Range(Cells(1, 1), Cells(27, 11)) For some strange reason it will not do the allocation. I thought that maybe I had gotten the reference notation wrong so I tried the following to test it: ActiveWorkbook.Sheets(1).Range(Cells(1, 1), Cells(27, 11)).Select Lo and behold that wont work either, which suggests that's the problem. However I have looked up the notation to check, and even pasted an example from Microsoft into my code to test and that wont work either, which suggests it may be something else but I am at a complete loss to know what that something else might be. Can anyone either see anything wrong with the code above or if not suggest what is wrong/why it isn't working? Any help much appreciated, it's almost embarrassing to be asking such a simple thing but I've tried everything I can to fix it and it has held me up for long enough so I thought someone on the user group may be able to help me. Thanks in advance, Mark |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What's wrong: Only one address block appears per page | Excel Discussion (Misc queries) | |||
VBA to reference one cell in a range of one or more cells | Excel Programming | |||
reference format Range(Cells(),Cells()) | Excel Programming | |||
How do I reference the same cell as I move through range of cells. | Excel Worksheet Functions | |||
the autosum do not working propely ##### THAT WHAT APPEARS PLEA. | Excel Discussion (Misc queries) |