out of range message

  • Thread starter Thread starter Souris
  • Start date Start date
S

Souris

I get message box from the msgbox, but I get out of range fwhen I assign the
range to my DestSheetRange. Any suggestions?

Your help is great appreciated,

Here is my code,

Response = MsgBox(Application.ActiveSheet.Range("B11").Value, vbOKOnly)

Dim DestSheetRange As Range


DestSheetRange = Sheets("sheet1").Range("B11")
 
Set DestSheetRange = Sheets("sheet1").Range("B11")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Check your spelling of that worksheet name--I don't think "Sheet1" exists in the
active workbook.

and remember you'll need to use the Set statement when you're working with
objects (like Ranges):

dim DestSheetRange as Range
Set DestSheetRange = Sheets("SpelledCorrectly").range("B11")
 
Thanks for message,

Dave Peterson said:
Check your spelling of that worksheet name--I don't think "Sheet1" exists in the
active workbook.

and remember you'll need to use the Set statement when you're working with
objects (like Ranges):

dim DestSheetRange as Range
Set DestSheetRange = Sheets("SpelledCorrectly").range("B11")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top