Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Jimmy Hawkins   on Feb 11 In MS Office Category.

  
Question Answered By: Kian Evans   on Feb 11

I've gotten a little further, just can't quite get my sub to read
named arrays. For instance, this works:

Sub MySub1()
Msgbox Range("MyNamedCell")
End Sub

...but this doesn't:

Sub MySub2()
Dim MyRange as Range
MyRange = Range("MyNamedRange")
End Sub

I get "Run time error 91: Object Variable or With object variable not
set." Debug highlights the 3rd line in my second subroutine.

When I try something simpler:

Sub MySub3()
Dim MyRange as Range
MsgBox Range("MyNamedRange")
End Sub

I get a type mismatch 13. Is there some syntax I need to use to
access a named range of more than one cell?

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Problem Executing Subroutine Or get search suggestion and latest updates.


Tagged: