LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default cannot set range class?

Howdee all.
I've made a user form to input a couple of worksheet functions, and have run
across a problem that doesn't show up on other workbooks.

I get a runtime error message- 1004-- stating: Unable to set the
FormulaArray property of the Range class.

When I had this earlier today I'd found it was due to my not having set the
..address() components of the range.
However, I'd fixed that, and it works on another workbook just fine.
I then set a message box to see what the equation was outputting, and all I
got was a 'false.'
I.e.,
msgbox myrng3.formula = myformula2, vbokonly, "test"

I'm unable to find anything that'd keep it from working. I did notice that
it did not place the single quote mark around the worksheet name, as is
standard. I tried placing a chr(39) in there, and it threw yet another error,
so I removed it.

The only difference I can identify is that the worksheet's name has a number
on the end, where it's not working.
SheetA, as opposed to SheetA_081

Here's my formula, and set for the FormulaArray.
myFormula2 = "=IF(ROWS(" & MyRng3.Address(RowAbsolute:=True,
ColumnAbsolute:=True, _
external:=False) & ":" & MyRng3.Address(RowAbsolute:=False,
ColumnAbsolute:=True, _
external:=False) & ")" & MyRng2.Address(RowAbsolute:=False,
ColumnAbsolute:=True, _
external:=False) & "," & Chr(34) & "All Names Accounted For" & Chr(34) &
",INDEX(" _
& MyRng.Address(RowAbsolute:=True, ColumnAbsolute:=True, external:=True) & _
",SMALL(IF(ISNA(MATCH(" & MyRng.Address(RowAbsolute:=True,
ColumnAbsolute:=True, external:=True) _
& "," & MyRngA.Address(RowAbsolute:=True, ColumnAbsolute:=True,
external:=False) & ",0)),ROW(" _
& MyRng.Address(RowAbsolute:=True, ColumnAbsolute:=True, external:=True) & _
")),ROWS(" & MyRng3.Address(RowAbsolute:=True, ColumnAbsolute:=True,
external:=False) _
& ":" & MyRng3.Address(RowAbsolute:=False, ColumnAbsolute:=True,
external:=False) & _
"))-MIN(ROW(" & MyRng.Address(RowAbsolute:=True, ColumnAbsolute:=True,
external:=True) & "))+1))"

MyRng3.FormulaArray = myFormula2

If the rest of the form's code is needed, please let me know.

Thank you.
Best.
 
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
"PasteSpecial method of Range class failed" when range Number of Rows 2000 eskimo2 Excel Programming 0 October 19th 07 06:09 PM
IS 'RANGE WINDOW CLASS' AVAILABLE ? halim Excel Programming 1 July 15th 06 06:58 AM
IS 'RANGE WINDOW CLASS' AVAILABLE ? halim Excel Programming 1 July 15th 06 06:46 AM
range class problem Tom Ogilvy Excel Programming 0 August 2nd 04 05:35 PM
Range Class falure Paul Excel Programming 5 November 10th 03 12:52 PM


All times are GMT +1. The time now is 02:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"