Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default out of range message

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")
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default out of range message


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

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Souris" wrote in message
...
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")



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default out of range message

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")



Souris wrote:

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")


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default out of range message

Thanks for message,

"Dave Peterson" wrote:

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")



Souris wrote:

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")


--

Dave Peterson

Reply
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
out of range error message juergenkemeter[_17_] Excel Programming 2 January 19th 06 06:06 AM
Continuation of message Range Names Barb Reinhardt Excel Programming 6 January 17th 06 09:30 PM
Change message to include range Pat Excel Programming 7 January 17th 05 10:37 AM
Subscript Out Of Range Error Message Tod Excel Programming 0 July 28th 04 06:24 PM
How Do I Display a Range of Cells in A Message Box Using VBA? Excel Nerd Excel Programming 2 January 22nd 04 12:48 PM


All times are GMT +1. The time now is 03:31 PM.

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

About Us

"It's about Microsoft Excel"